Skip to content

Commit

Permalink
Hid "Make Owner" action for staff users that are currently suspended
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinansfield committed Mar 4, 2019
1 parent 8de12b5 commit 2954e0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/staff/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ export default Controller.extend({
canAssignRoles: or('currentUser.isAdmin', 'currentUser.isOwner'),
canChangeEmail: not('isAdminUserOnOwnerProfile'),
canChangePassword: not('isAdminUserOnOwnerProfile'),
canMakeOwner: and('currentUser.isOwner', 'isNotOwnProfile', 'user.isAdmin'),
canMakeOwner: and('currentUser.isOwner', 'isNotOwnProfile', 'user.isAdmin', 'isNotSuspended'),
isAdminUserOnOwnerProfile: and('currentUser.isAdmin', 'user.isOwner'),
isNotOwnersProfile: not('user.isOwner'),
isNotSuspended: not('user.isSuspended'),
rolesDropdownIsVisible: and('isNotOwnProfile', 'canAssignRoles', 'isNotOwnersProfile'),
userActionsAreVisible: or('deleteUserActionIsVisible', 'canMakeOwner'),

Expand Down

0 comments on commit 2954e0a

Please sign in to comment.