From 2954e0ae954612ba0fa8cd08629a8456392c627a Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 4 Mar 2019 16:45:16 +0000 Subject: [PATCH] Hid "Make Owner" action for staff users that are currently suspended refs https://github.com/TryGhost/Ghost/issues/10555 --- app/controllers/staff/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/staff/user.js b/app/controllers/staff/user.js index a43cf09f7..bf73a04b5 100644 --- a/app/controllers/staff/user.js +++ b/app/controllers/staff/user.js @@ -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'),