This commit is contained in:
Matthew Ryan Dillon 2015-10-16 11:07:09 -07:00
parent bcd2bbb4c4
commit d3355370fd
6 changed files with 4 additions and 10 deletions

View file

@ -1,10 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
isAdmin: Ember.computed('currentUser', function() {
return this.get('currentUser.role') == 'A';
}),
roles: Ember.String.w('A R W'),
actions: {

View file

@ -16,7 +16,7 @@
<div data-row-span="1">
<div data-field-span="1">
<label>Role</label>
{{#if isAdmin}}
{{#if session.currentUser.isAdmin}}
<select onchange={{action (mut user.role) value="target.value"}}>
{{#each roles as |roleChoice|}}
<option value={{roleChoice}} selected={{equal user.role roleChoice}}>{{roleChoice}}</option>