Skip to content

Instantly share code, notes, and snippets.

@neokoenig
Created June 8, 2017 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neokoenig/2e7e0503c9d069bc6b1dbc249d72612b to your computer and use it in GitHub Desktop.
Save neokoenig/2e7e0503c9d069bc6b1dbc249d72612b to your computer and use it in GitHub Desktop.
component extends="app.controllers.Controller"
{
function config() {
filters(through="checkAdminPermissions");
}
// This is highly simplified for illustration only
private function checkAdminPermissions(){
if(session.user.role != "admin"){
abort;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment