[jboss-jira] [JBoss JIRA] (WFCORE-1068) Simplify failing in the case of RBAC AuthorizationResult.Decision.DENY
Brian Stansberry (JIRA)
issues at jboss.org
Mon Oct 26 11:24:00 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFCORE-1068:
-------------------------------------
Fix Version/s: 3.0.0.Alpha1
> Simplify failing in the case of RBAC AuthorizationResult.Decision.DENY
> ----------------------------------------------------------------------
>
> Key: WFCORE-1068
> URL: https://issues.jboss.org/browse/WFCORE-1068
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Reporter: Brian Stansberry
> Priority: Optional
> Fix For: 3.0.0.Alpha1
>
>
> There's a fair amount of this kind of code in misc OSHs that directly ask the OperationContext to authorize something:
> {code}
> AuthorizationResult authorizationResult = context.authorize(...);
> if (authorizationResult.getDecision() == AuthorizationResult.Decision.DENY) {
> throw ControllerMessages.MESSAGES.unauthorized(operation.get(OP).asString(),
> context.getCurrentAddress()), authorizationResult.getExplanation());
> }
> {code}
> We can replace that if block with a call to a new util method on AuthorizationResult itself:
> {code}
> public void failIfDenied(ModelNode operation, PathAddress pathAddress) throws OperationFailedException
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list