add Phased

This commit is contained in:
zhou-hao
2017-11-28 17:30:47 +08:00
parent 515ff52ee1
commit 5b0a408fb4
2 changed files with 12 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Authorize {
public @interface Authorize {
/**
* 对角色授权,当使用按角色授权时,对模块以及操作级别授权方式失效
@@ -91,14 +91,18 @@ public @interface Authorize {
*/
Logical logical() default Logical.DEFAULT;
/**
* @return 验证时机在方法调用前还是调用后s
*/
Phased phased() default Phased.before;
/**
* @return 是否忽略, 忽略后将不进行权限控制
*/
boolean ignore() default false;
/**
*
* @return 数据权限控制
*/
RequiresDataAccess[] dataAccess()default {};
RequiresDataAccess[] dataAccess() default {};
}

View File

@@ -0,0 +1,5 @@
package org.hswebframework.web.authorization.annotation;
enum Phased{
before,after
}