Created
June 8, 2017 12:03
-
-
Save neokoenig/2e7e0503c9d069bc6b1dbc249d72612b to your computer and use it in GitHub Desktop.
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
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