0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Admin isn't shown "make owner" option

closes #3558
- Replaced canAssignRoles as "show user" conditional with new
"canMakeOwner"
This commit is contained in:
Felix Rieseberg 2014-08-01 13:03:26 -07:00
parent 653fe3fb44
commit 4c79770580
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{{#if view.parentView.rolesDropdownIsVisible}}
{{#if view.parentView.canMakeOwner}}
<a href="javascript:void(0);" {{action "openModal" "transfer-owner" this}}>Make Owner</a>
{{/if}}
{{#if view.parentView.deleteUserActionIsVisible}}

View file

@ -6,6 +6,8 @@ var SettingsUserView = Ember.View.extend({
}),
canAssignRoles: Ember.computed.or('currentUser.isAdmin', 'currentUser.isOwner'),
canMakeOwner: Ember.computed.and('currentUser.isOwner', 'isNotOwnProfile'),
rolesDropdownIsVisible: Ember.computed.and('isNotOwnProfile', 'canAssignRoles'),
@ -17,7 +19,7 @@ var SettingsUserView = Ember.View.extend({
}
}),
userActionsAreVisible: Ember.computed.or('deleteUserActionIsVisible', 'rolesDropdownIsVisible')
userActionsAreVisible: Ember.computed.or('deleteUserActionIsVisible', 'canMakeOwner')
});