Created
June 10, 2013 03:17
-
-
Save shubik/5746313 to your computer and use it in GitHub Desktop.
Defining permissions and custom roles for Prometheus ORM models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permissions: { | |
'create' : ['admin'], | |
'read' : ['admin', 'owner', 'company'], | |
'update' : ['admin', 'owner'], | |
'destroy' : ['admin', 'owner'], | |
'transfer' : ['admin', 'owner'] | |
}, | |
roles: { | |
company: { | |
fk_param: 'company_id', | |
check: function (session_user) { | |
return true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment