Skip to content

Instantly share code, notes, and snippets.

@shubik
Created June 10, 2013 03:17
Show Gist options
  • Save shubik/5746313 to your computer and use it in GitHub Desktop.
Save shubik/5746313 to your computer and use it in GitHub Desktop.
Defining permissions and custom roles for Prometheus ORM models
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