2019-01-14 11:48:32 +01:00
|
|
|
package org.gcube.common.authorization.control.annotations;
|
|
|
|
|
|
|
|
import java.lang.annotation.ElementType;
|
|
|
|
import java.lang.annotation.Inherited;
|
|
|
|
import java.lang.annotation.Retention;
|
|
|
|
import java.lang.annotation.RetentionPolicy;
|
|
|
|
import java.lang.annotation.Target;
|
|
|
|
|
|
|
|
import org.gcube.common.authorization.library.policies.Action;
|
|
|
|
|
|
|
|
@Inherited
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
@Target(ElementType.METHOD)
|
|
|
|
public @interface AuthorizationControl {
|
|
|
|
|
|
|
|
Action[] actions() default {};
|
2019-10-10 12:35:41 +02:00
|
|
|
String[] allowedUsers() default {};
|
|
|
|
String[] allowedRoles() default {};
|
2019-01-14 11:48:32 +01:00
|
|
|
Class<? extends RuntimeException> exception();
|
|
|
|
}
|