Dropping ember-can

This commit is contained in:
Matthew Dillon 2015-06-05 09:36:51 -08:00
parent 3501dc1986
commit 53be80d617
13 changed files with 57 additions and 75 deletions

View file

@ -3,6 +3,14 @@ import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['grid-1'],
isEditing: false,
canEdit: function() {
let role = this.get('session.currentUser.role');
let id = this.get('session.currentUser.id');
let author = this.get('strain.createdBy');
return (role === 'W' && (+id === author)) || (role === 'A');
}.property('session.currentUser.role', 'session.currentUser.id', 'strain.createdBy'),
actions: {
save: function() {
this.sendAction('save');

View file

@ -116,7 +116,7 @@
</div>
{{! ROW 6 }}
{{#if (can "edit strain" strain)}}
{{#if canEdit}}
<div class="grid-4">
<div class="span-1">
{{! Does nothing ATM }}