mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-07-01 00:34:19 +08:00
优化实体命名
This commit is contained in:
@@ -25,6 +25,7 @@ import java.lang.annotation.*;
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Documented
|
||||
public @interface Authorize {
|
||||
|
||||
@@ -49,8 +50,18 @@ public @interface Authorize {
|
||||
*/
|
||||
String[] action() default {};
|
||||
|
||||
/**
|
||||
* 验证是否为指定user
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String[] user() default {};
|
||||
|
||||
/**
|
||||
* 验证失败时返回的消息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String message() default "{unauthorized}";
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.util.Set;
|
||||
/**
|
||||
* @author zhouhao
|
||||
*/
|
||||
@Authorize(user = "{data.creatorId}")
|
||||
public interface UserSubject {
|
||||
|
||||
String getUsername();
|
||||
|
||||
Reference in New Issue
Block a user