Search in sources :

Example 1 with RequestObject

use of com.sequenceiq.authorization.annotation.RequestObject in project cloudbreak by hortonworks.

the class RequestPropertyAuthorizationFactory method doGetAuthorization.

@Override
public Optional<AuthorizationRule> doGetAuthorization(CheckPermissionByRequestProperty methodAnnotation, String userCrn, ProceedingJoinPoint proceedingJoinPoint, MethodSignature methodSignature) {
    Object requestObject = commonPermissionCheckingUtils.getParameter(proceedingJoinPoint, methodSignature, RequestObject.class, Object.class);
    LOGGER.debug("Getting authorization rule to authorize user [{}] for action [{}] over property [{}] of request object.", userCrn, methodAnnotation.action(), methodAnnotation.path());
    return calcAuthorization(requestObject, methodAnnotation, userCrn);
}
Also used : RequestObject(com.sequenceiq.authorization.annotation.RequestObject)

Aggregations

RequestObject (com.sequenceiq.authorization.annotation.RequestObject)1