Add extra notes to EditUserRolesAction
Add an extra note which explains why the action is invalid if not all roles are manageable, as otherwise it is unclear why the action was invalid. Change-Id: I4bc368cf16fca50135977b22c8a96aacd9740890
This commit is contained in:
parent
ad81fdf706
commit
994e844044
@ -340,7 +340,11 @@ class EditUserRolesAction(UserIdAction, ProjectMixin, UserMixin):
|
||||
new_roles_manageable = self.are_roles_manageable(
|
||||
self.action.task.keystone_user['roles'], all_roles)
|
||||
|
||||
return new_roles_manageable and current_roles_manageable
|
||||
if new_roles_manageable and current_roles_manageable:
|
||||
self.add_note("All user roles are manageable.")
|
||||
return True
|
||||
self.add_note("Not all user roles are manageable.")
|
||||
return False
|
||||
|
||||
def _validate(self):
|
||||
self.action.valid = validate_steps([
|
||||
|
Loading…
Reference in New Issue
Block a user