Merge pull request #3561 from felixrieseberg/iss3558

Admin isn't shown "make owner" option
This commit is contained in:
Hannah Wolfe 2014-08-02 10:33:55 +01:00
commit bdc8fa49fc
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')
});