Reply To: Custom Authorization check in rules

Splash Forums Rewrite Users Custom Authorization check in rules Reply To: Custom Authorization check in rules

#27422

cbensemann
Participant

Thanks for your comment. I had considered doing it in a controller class but had thought it might be easier to do in rewrite so had a go 🙂 If you’re doing it in a controller how would you then force the redirect to an access denied page? Just a redirect in a PostConstruct method?

When I first started looking at it I had hoped to be able to annotate a method in the controller to be run as that would allow all the logic to be contained in the controller.

maybe something like:

@When(forwardTo=”/access-denied.xhtml”)
public boolean hasFailedCustomAuthorisation() {}

Thoughts?

Craig