2013-03-30 19:06:32 +01:00
|
|
|
package com.commafeed.frontend;
|
2013-03-28 17:07:37 +01:00
|
|
|
|
|
|
|
|
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 javax.enterprise.util.Nonbinding;
|
|
|
|
|
import javax.interceptor.InterceptorBinding;
|
|
|
|
|
|
2013-03-30 19:06:32 +01:00
|
|
|
import com.commafeed.backend.model.UserRole.Role;
|
|
|
|
|
|
2013-03-28 17:07:37 +01:00
|
|
|
@Inherited
|
|
|
|
|
@InterceptorBinding
|
|
|
|
|
@Target({ ElementType.TYPE, ElementType.METHOD })
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
public @interface SecurityCheck {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Roles needed.
|
|
|
|
|
*/
|
|
|
|
|
@Nonbinding
|
2013-03-30 19:06:32 +01:00
|
|
|
Role value() default Role.USER;
|
2013-05-01 21:56:59 +02:00
|
|
|
|
|
|
|
|
@Nonbinding
|
|
|
|
|
boolean apiKeyAllowed() default false;
|
2013-03-28 17:07:37 +01:00
|
|
|
}
|