0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Hide role dropdown on user page if user is owner

Closes #3764
This commit is contained in:
Matt Enlow 2014-08-12 18:06:34 -06:00
parent b6507bed9b
commit 8748895607

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')) ||