Class AuthorisationDecision


  • public class AuthorisationDecision
    extends Object
    Class to decide whether a single or a set of constraints are allowed according to a given security context. The security context must be provided by a SecurityContextResolver. isAllowed() returns true if the security context was resolved and the constraint is valid.

    To hide or disable UI elements, use one of the following strategies:

    Eager filtering
    If the security context is available when the UI elements are created, filter the elements based on the outcome of isAllowed(). Add only allowed elements to the DOM.
    Late hiding
    If the security context is not available when the UI elements are created, store the constraints as data-constraint attributes. Later when you have access to the security context post-process the elements using one of the processElements() method from ElementGuard.

    If WildFly uses AccessControlProvider.SIMPLE, isAllowed() will always return true.