Skip to content

Conversation

@jbellomy
Copy link

Allow a closure for the result parameter in routeNeedsRole(), routeNeedsPermission(), and routeNeedsRoleOrPermission()

The closure will only be executed when the user does not have the required privileges.
This can be used to flash an error message or trigger some other action when access is denied.

…edsPermission(), and routeNeedsRoleOrPermission()
@andrewelkins
Copy link
Collaborator

Looks great, but one thing, can you add test cases for this as well. Once that's done I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants