Created
November 10, 2009 18:34
-
-
Save mstine/231140 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
public class AuthFilters { | |
def authenticateService | |
def filters = { | |
blurbCheck(controller: 'blurb') { | |
before = { | |
if (authenticateService.ifAllGranted('ROLE_ADMIN')) { | |
return true | |
} else { | |
redirect controller: 'login' | |
return false | |
} | |
} | |
} | |
settingsCheck(controller: 'setting') { | |
before = { | |
if (authenticateService.ifAllGranted('ROLE_ADMIN')) { | |
return true | |
} else { | |
redirect controller: 'login' | |
return false | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment