Reply To: access control – prettyfaces

Splash Forums PrettyFaces Users access control – prettyfaces Reply To: access control – prettyfaces

#26087

You can simply create a custom condition to implement such access control checks. Something similar to JAASRole which ships with rewrite. Just create a class extending HttpCondition and implement the check accordingly:

https://github.com/ocpsoft/rewrite/blob/master/config-servlet/src/main/java/org/ocpsoft/rewrite/servlet/config/JAASRoles.java#L52

Then just use your custom condition like any other condition as shown here:

https://github.com/ocpsoft/rewrite/blob/master/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JaasRolesTestProvider.java#L19