ソースを参照

弃用权限注解的api属性

zhouhao 8 年 前
コミット
ddd7162c63

+ 2 - 0
hsweb-web-core/src/main/java/org/hsweb/web/core/authorize/AuthorizeValidatorConfig.java

@@ -18,8 +18,10 @@ public interface AuthorizeValidatorConfig {
 
     AuthorizeValidatorConfig addExpression(String expression, String language);
 
+    @Deprecated
     AuthorizeValidatorConfig setApiSupport(boolean apiSupport);
 
+    @Deprecated
     boolean isApiSupport();
 
     boolean isEmpty();

+ 1 - 0
hsweb-web-core/src/main/java/org/hsweb/web/core/authorize/annotation/Authorize.java

@@ -52,6 +52,7 @@ public @interface Authorize {
      *
      * @return
      */
+    @Deprecated
     boolean api() default false;
 
     /**

+ 3 - 2
hsweb-web-core/src/main/java/org/hsweb/web/core/authorize/validator/SimpleAuthorizeValidatorConfig.java

@@ -20,7 +20,7 @@ public class SimpleAuthorizeValidatorConfig implements AuthorizeValidatorConfig
     protected Set<String> actions;
     protected Set<Expression> expressions = new LinkedHashSet<>();
     protected Authorize.MOD mod;
-    protected boolean apiSupport;
+    protected boolean       apiSupport;
 
     @Override
     public AuthorizeValidatorConfig setApiSupport(boolean apiSupport) {
@@ -92,7 +92,8 @@ public class SimpleAuthorizeValidatorConfig implements AuthorizeValidatorConfig
     }
 
     public boolean isApiSupport() {
-        return apiSupport;
+        return true;
+        //    return apiSupport;
     }
 
     public void setExpressions(Set<Expression> expressions) {