Improved error handling.

This commit is contained in:
Martin Edenhofer 2016-10-18 18:28:38 +02:00
parent 19d57cf21d
commit b937ef9371

View file

@ -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