Skip to content

Instantly share code, notes, and snippets.

@mstine
Created November 10, 2009 18:34
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 mstine/231140 to your computer and use it in GitHub Desktop.
Save mstine/231140 to your computer and use it in GitHub Desktop.
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