struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/3] struts git commit: add GlobalAllowedMethods getter to PackageConfig and modified getActionConfig method in ConventionUnknownHandler to reference it
Date Sun, 12 Jun 2016 17:38:42 GMT
add GlobalAllowedMethods getter to PackageConfig and modified getActionConfig method in ConventionUnknownHandler
to reference it


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/dd3b80f2
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/dd3b80f2
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/dd3b80f2

Branch: refs/heads/master
Commit: dd3b80f2be6feb72de808087edcf7914e9d5bb6b
Parents: 0d92fd0
Author: jumiller <jumiller@utah.gov>
Authored: Fri Jun 10 07:59:27 2016 -0600
Committer: jumiller <jumiller@utah.gov>
Committed: Fri Jun 10 07:59:27 2016 -0600

----------------------------------------------------------------------
 .../opensymphony/xwork2/config/entities/PackageConfig.java    | 7 +++++++
 .../apache/struts2/convention/ConventionUnknownHandler.java   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/dd3b80f2/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
index c0e9477..bb34018 100644
--- a/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
+++ b/core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
@@ -346,6 +346,13 @@ public class PackageConfig extends Located implements Comparable, Serializable,
         return globalExceptionMappingConfigs;
     }
 
+    /**
+     * gets the GlobalAllowedMethods local to this package
+     *
+     * @return a Set of method names allowed to be executed if strict method invocation is
enabled
+     */
+    public Set<String> getGlobalAllowedMethods() { return globalAllowedMethods; }
+
     public boolean isStrictMethodInvocation() {
         return strictMethodInvocation;
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/dd3b80f2/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
----------------------------------------------------------------------
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
index 717bcc5..ace9446 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/ConventionUnknownHandler.java
@@ -221,7 +221,7 @@ public class ConventionUnknownHandler implements UnknownHandler {
         return new ActionConfig.Builder(defaultParentPackageName, "execute", ActionSupport.class.getName()).
                 addInterceptors(interceptors).
                 addResultConfigs(results).
-                addAllowedMethod(allowedMethods).
+                addAllowedMethod(pkg.getGlobalAllowedMethods()).
                 build();
     }
 


Mime
View raw message