mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-06-03 19:33:16 +08:00
优化权限,整合在一起
This commit is contained in:
@@ -36,7 +36,7 @@ import java.lang.annotation.*;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Documented
|
||||
public @interface Authorize {
|
||||
public @interface Authorize {
|
||||
|
||||
/**
|
||||
* 对角色授权,当使用按角色授权时,对模块以及操作级别授权方式失效
|
||||
@@ -95,4 +95,10 @@ public @interface Authorize {
|
||||
* @return 是否忽略, 忽略后将不进行权限控制
|
||||
*/
|
||||
boolean ignore() default false;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return 数据权限控制
|
||||
*/
|
||||
RequiresDataAccess[] dataAccess()default {};
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.lang.annotation.*;
|
||||
*
|
||||
* @author zhouhao
|
||||
* @see DataAccessController
|
||||
* @see Authorize#dataAccess()
|
||||
* @since 3.0
|
||||
*/
|
||||
@Target({ElementType.TYPE, ElementType.METHOD})
|
||||
@@ -41,6 +42,7 @@ public @interface RequiresDataAccess {
|
||||
/**
|
||||
* @return permission id ,如果为空将继承 {@link Authorize#permission()}
|
||||
* @see Permission#getId()
|
||||
*
|
||||
*/
|
||||
String permission() default "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user