public class PermissionCheckImpl extends Object implements PermissionCheck
Permission
instance.Modifier and Type | Field and Description |
---|---|
protected String |
permission |
protected PermissionManager |
permissionManager |
protected Boolean |
result |
protected org.jboss.errai.security.shared.api.identity.User |
user |
protected VotingStrategy |
votingStrategy |
Constructor and Description |
---|
PermissionCheckImpl(PermissionManager permissionManager,
String permission,
org.jboss.errai.security.shared.api.identity.User user,
VotingStrategy votingStrategy) |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
AuthorizationCheck |
denied(Command onDenied)
Specifies the command instance to execute in case the check result is denied.
|
AuthorizationCheck |
granted(Command onGranted)
Specifies the command instance to execute in case the check result is granted.
|
boolean |
result()
Get the check result value
|
protected PermissionManager permissionManager
protected String permission
protected org.jboss.errai.security.shared.api.identity.User user
protected VotingStrategy votingStrategy
protected Boolean result
public PermissionCheckImpl(PermissionManager permissionManager, String permission, org.jboss.errai.security.shared.api.identity.User user, VotingStrategy votingStrategy)
protected void check()
public AuthorizationCheck granted(Command onGranted)
AuthorizationCheck
granted
in interface AuthorizationCheck
onGranted
- The command to executepublic AuthorizationCheck denied(Command onDenied)
AuthorizationCheck
denied
in interface AuthorizationCheck
onDenied
- The command to executepublic boolean result()
AuthorizationCheck
result
in interface AuthorizationCheck
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.