git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/Common/authorization-common-library@174491 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
81f61fc510
commit
ff434e0d28
|
@ -33,7 +33,7 @@ public class AuthorizationAspect {
|
|||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
AuthorizationControl authAnn = (AuthorizationControl) method.getAnnotation(AuthorizationControl.class);
|
||||
log.info("aspect before with annotation {} and value {} in method {}", authAnn.annotationType(), authAnn.actions(), authAnn.allowed(), method.getName());
|
||||
log.info("aspect before with annotation {} with action {}, allowed {} in method {}", authAnn.annotationType(), authAnn.actions(), authAnn.allowed(), method.getName());
|
||||
String userId = AuthorizationProvider.instance.get().getClient().getId();
|
||||
if (authAnn.allowed().length!=0 && !Arrays.asList(authAnn.allowed()).contains(userId))
|
||||
throw new RuntimeException("user not allowed to call method "+method.getName());
|
||||
|
|
Loading…
Reference in New Issue