Working on users

This commit is contained in:
Matthew Dillon 2015-09-09 16:49:48 -07:00
parent be8a842c67
commit 425dd689ae
7 changed files with 117 additions and 5 deletions

View file

@ -12,4 +12,17 @@ export default DS.Model.extend({
isAdmin: function() {
return this.get('role') === 'A';
}.property('role'),
fullRole: function() {
let role = this.get('role');
if (role === 'R') {
return 'Read-Only';
} else if (role === 'W') {
return 'Write';
} else if (role === 'A') {
return 'Admin';
} else {
return 'Error';
}
}.property('role'),
});