优化权限,整合在一起

This commit is contained in:
zhouhao
2017-08-12 09:12:42 +08:00
parent a1032204a7
commit 1074979030
2 changed files with 9 additions and 1 deletions

View File

@@ -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 {};
}

View File

@@ -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 "";