diff options
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r-- | webapp/actions/user_actions.jsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index fefca79f7..ce2246d30 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -352,3 +352,22 @@ export function generateMfaSecret(success, error) { } ); } + +export function updateUserRoles(userId, newRoles, success, error) { + Client.updateUserRoles( + userId, + newRoles, + () => { + AsyncClient.getUser(this.props.user.id); + + if (success) { + success(); + } + }, + (err) => { + if (error) { + error(err); + } + } + ); +} |