mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
security revamp
This commit is contained in:
22
src/main/java/com/commafeed/frontend/auth/SecurityCheck.java
Normal file
22
src/main/java/com/commafeed/frontend/auth/SecurityCheck.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.commafeed.frontend.auth;
|
||||
|
||||
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 com.commafeed.backend.model.UserRole.Role;
|
||||
|
||||
@Inherited
|
||||
@Target({ ElementType.PARAMETER })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface SecurityCheck {
|
||||
|
||||
/**
|
||||
* Roles needed.
|
||||
*/
|
||||
Role value() default Role.USER;
|
||||
|
||||
boolean apiKeyAllowed() default false;
|
||||
}
|
||||
Reference in New Issue
Block a user