Working on users
This commit is contained in:
parent
be8a842c67
commit
425dd689ae
7 changed files with 117 additions and 5 deletions
|
@ -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'),
|
||||
});
|
||||
|
|
Reference in a new issue