api(application): allow updating a user's role
This commit is contained in:
parent
ca4046e818
commit
e56aef31bc
2 changed files with 3 additions and 2 deletions
|
@ -21,7 +21,7 @@ class StoreUserRequest extends ApplicationApiRequest
|
|||
'username',
|
||||
'password',
|
||||
'language',
|
||||
'root_admin',
|
||||
'admin_role_id',
|
||||
])->toArray();
|
||||
|
||||
$response['first_name'] = $rules['name_first'];
|
||||
|
|
|
@ -94,7 +94,7 @@ class User extends Model implements
|
|||
'use_totp',
|
||||
'totp_secret',
|
||||
'totp_authenticated_at',
|
||||
'gravatar',
|
||||
'admin_role_id',
|
||||
'root_admin',
|
||||
];
|
||||
|
||||
|
@ -147,6 +147,7 @@ class User extends Model implements
|
|||
'name_first' => 'required|string|between:1,191',
|
||||
'name_last' => 'required|string|between:1,191',
|
||||
'password' => 'sometimes|nullable|string',
|
||||
'admin_role_id' => 'sometimes|nullable|exists:admin_roles,id',
|
||||
'root_admin' => 'boolean',
|
||||
'language' => 'string',
|
||||
'use_totp' => 'boolean',
|
||||
|
|
Loading…
Reference in a new issue