Last active
January 22, 2020 20:21
-
-
Save kimberleehowley/71c311d62af19b03829b94fdbba28611 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
def controllerFunction() { | |
def user = User.get(params.userId) | |
if (!userPermissionService.hasPermissionToDoThis(user) { | |
response.status = 403 | |
render "User unauthorized" | |
return | |
} | |
def comments = commentsService.getByUser(user) | |
... | |
render finalObject as JSON | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment