Use role selection response for setting role
Previously we were fetching the role assignments again. Not necessary, as the request for setting a role already returns the resulting assignment object as a response.
This commit is contained in:
@@ -95,7 +95,10 @@ export default {
|
||||
})
|
||||
|
||||
if (response.status === 201) {
|
||||
this.getUsersCurrentRole()
|
||||
const roleId = response.data.assignment.roleId
|
||||
this.currentRole = this.roles.find(role => {
|
||||
return role.id === roleId
|
||||
})
|
||||
} else {
|
||||
this.showMessage({
|
||||
title: this.$gettext('Failed to change role.'),
|
||||
|
||||
Reference in New Issue
Block a user