UpdateUser
Update user's information and roles.
Parameters
- username: user's name.
- [optional] password: user's password.
- [optional] add_roles: array of roles to be assigned to the user.
- [optional] remove_roles: array of roles to be removed from the user.
- [optional] add_tokens: array of tokens to be assigned to the user.
- [optional] remove_tokens: array of tokens to be removed from the user.
- [optional] email: user's email.
Details
A user's parameters that are not specified will remain unchanged.
See GenerateToken for token generation. See CreateRole for role descriptions.
Examples
Update roles of an user using UpdateUser command:
[{
"UpdateUser": {
"username": "john",
"add_roles": ["architect"],
"remove_roles": ["admin"]
}
}]
Result from a successful update:
[{
"UpdateUser": {
"status": 0
}
}]