From 874889560737fe618ba8841be6b9068838ed3b45 Mon Sep 17 00:00:00 2001 From: Matt Enlow Date: Tue, 12 Aug 2014 18:06:34 -0600 Subject: [PATCH] Hide role dropdown on user page if user is owner Closes #3764 --- core/client/views/settings/users/user.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/client/views/settings/users/user.js b/core/client/views/settings/users/user.js index f12c93d3c8..61e456b24d 100644 --- a/core/client/views/settings/users/user.js +++ b/core/client/views/settings/users/user.js @@ -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')) ||