0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Merge pull request #3769 from novaugust/iss3764

Hide role dropdown on user page if user is owner
This commit is contained in:
Hannah Wolfe 2014-08-15 17:53:46 +01:00
commit d2e09de0de

View file

@ -5,11 +5,13 @@ var SettingsUserView = Ember.View.extend({
return this.get('controller.user.id') !== this.get('currentUser.id');
}),
isNotOwnersProfile: Ember.computed.not('controller.user.isOwner'),
canAssignRoles: Ember.computed.or('currentUser.isAdmin', 'currentUser.isOwner'),
canMakeOwner: Ember.computed.and('currentUser.isOwner', 'isNotOwnProfile', 'controller.user.isAdmin'),
rolesDropdownIsVisible: Ember.computed.and('isNotOwnProfile', 'canAssignRoles'),
rolesDropdownIsVisible: Ember.computed.and('isNotOwnProfile', 'canAssignRoles', 'isNotOwnersProfile'),
deleteUserActionIsVisible: Ember.computed('currentUser', 'canAssignRoles', 'controller.user', function () {
if ((this.get('canAssignRoles') && this.get('isNotOwnProfile') && !this.get('controller.user.isOwner')) ||