public class AuthorisationDecision extends Object
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:
isAllowed(). Add only allowed elements to the DOM.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.
| Modifier and Type | Method and Description |
|---|---|
static AuthorisationDecision |
from(Environment environment,
SecurityContext securityContext) |
static AuthorisationDecision |
from(Environment environment,
SecurityContextRegistry securityContextRegistry) |
static AuthorisationDecision |
from(Environment environment,
SecurityContextResolver resolver) |
boolean |
isAllowed(Constraint constraint) |
boolean |
isAllowed(Constraints constraints) |
public static AuthorisationDecision from(Environment environment, SecurityContextRegistry securityContextRegistry)
public static AuthorisationDecision from(Environment environment, SecurityContext securityContext)
public static AuthorisationDecision from(Environment environment, SecurityContextResolver resolver)
public boolean isAllowed(Constraints constraints)
public boolean isAllowed(Constraint constraint)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.