Improved error handling.
This commit is contained in:
parent
19d57cf21d
commit
b937ef9371
1 changed files with 2 additions and 0 deletions
|
@ -195,6 +195,8 @@ class App.User extends App.Model
|
||||||
if role.active is true
|
if role.active is true
|
||||||
for permission_id in role.permission_ids
|
for permission_id in role.permission_ids
|
||||||
permission = App.Permission.findNative(permission_id)
|
permission = App.Permission.findNative(permission_id)
|
||||||
|
if !permission
|
||||||
|
throw "No such permission for id #{permission_id}"
|
||||||
permissions[permission.name] = true
|
permissions[permission.name] = true
|
||||||
|
|
||||||
for localKey in keys
|
for localKey in keys
|
||||||
|
|
Loading…
Reference in a new issue