aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-webapp/src/main/resources/xwork.xml
diff options
context:
space:
mode:
Diffstat (limited to 'archiva-webapp/src/main/resources/xwork.xml')
-rw-r--r--archiva-webapp/src/main/resources/xwork.xml111
1 files changed, 55 insertions, 56 deletions
diff --git a/archiva-webapp/src/main/resources/xwork.xml b/archiva-webapp/src/main/resources/xwork.xml
index 806e01095..b2ef0a535 100644
--- a/archiva-webapp/src/main/resources/xwork.xml
+++ b/archiva-webapp/src/main/resources/xwork.xml
@@ -20,25 +20,39 @@
<xwork>
<!-- TODO: better error handling for exceptions needed! -->
- <!-- Include webwork defaults (from WebWork JAR). -->
- <include file="webwork-default.xml"/>
+ <!-- Include plexus-security xwork configurations. -->
+ <include file="xwork-security.xml"/>
- <!-- Include plexus-security xwork configurations. -->
- <include file="xwork-security.xml" />
-
- <package name="base" extends="webwork-default">
+ <package name="base" extends="security">
<interceptors>
<interceptor name="configuration" class="configurationInterceptor"/>
<interceptor name="pssSecureActions" class="pssSecureActionInterceptor"/>
+ <interceptor name="continuumConfigurationCheck" class="forceContinuumConfigurationInterceptor"/>
+ <interceptor name="pssForceAdminUser" class="pssForceAdminUserInterceptor"/>
+ <interceptor name="pssSecureActions" class="pssSecureActionInterceptor"/>
+ <interceptor name="pssAutoLogin" class="pssAutoLoginInterceptor"/>
+ <interceptor name="pssEnvironmentChecker" class="pssEnvironmentCheckInterceptor"/>
+
+ <interceptor-stack name="unconfiguredStack">
+ <interceptor-ref name="defaultStack"/>
+ <interceptor-ref name="pssEnvironmentChecker"/>
+ <interceptor-ref name="pssForceAdminUser"/>
+ <interceptor-ref name="pssAutoLogin"/>
+ <interceptor-ref name="pssSecureActions"/>
+ </interceptor-stack>
+
<interceptor-stack name="configuredStack">
<interceptor-ref name="defaultStack"/>
- <interceptor-ref name="configuration"/>
+ <interceptor-ref name="pssEnvironmentChecker"/>
+ <interceptor-ref name="pssForceAdminUser"/>
+ <interceptor-ref name="pssAutoLogin"/>
<interceptor-ref name="pssSecureActions"/>
+ <interceptor-ref name="configuration"/>
</interceptor-stack>
+
<interceptor-stack name="configuredPrepareParamsStack">
<interceptor-ref name="paramsPrepareParamsStack"/>
- <interceptor-ref name="configuration"/>
- <interceptor-ref name="pssSecureActions"/>
+ <interceptor-ref name="configuredStack"/>
</interceptor-stack>
</interceptors>
@@ -48,28 +62,27 @@
<global-results>
<!-- TODO: want an extra message on the configure page when this first happens! -->
<!-- TODO: can we send them back to the original location afterwards? -->
- <result name="admin-user-needed" type="redirect-action">
- <param name="namespace">/admin</param>
- <param name="actionName">addadmin</param>
- </result>
-
<result name="config-needed" type="redirect-action">
<param name="namespace">/admin</param>
<param name="actionName">configure</param>
</result>
-
+
<!-- This redirect is triggered by the configuration interceptor -->
<result name="config-repository-needed" type="redirect-action">
<param name="namespace">/admin</param>
<param name="actionName">addRepository</param>
<param name="method">input</param>
</result>
-
+
<!-- The following security-* result names arrive from the plexus-security package -->
- <result name="security-login-success" type="redirect-action">browse</result>
- <result name="security-login-cancel" type="redirect-action">browse</result>
- <result name="security-login-locked" type="redirect-action">browse</result>
- <result name="security-logout" type="redirect-action">browse</result>
+ <result name="security-login-success" type="redirect-action">index</result>
+ <result name="security-login-cancel" type="redirect-action">index</result>
+ <result name="security-login-locked" type="redirect-action">index</result>
+ <result name="security-logout" type="redirect-action">index</result>
+ <result name="requires-authentication" type="redirect-action">
+ <param name="actionName">login</param>
+ <param name="namespace">/security</param>
+ </result>
<result name="security-register-success" type="redirect-action">
<param name="actionName">login</param>
<param name="namespace">/security</param>
@@ -78,14 +91,21 @@
<param name="actionName">login</param>
<param name="namespace">/security</param>
</result>
- <result name="security-account-success" type="redirect-action">browse</result>
- <result name="security-account-cancel" type="redirect-action">browse</result>
-
- <!-- These results are names that the SecuredActionInterceptor utilizes -->
- <result name="requires-authentication">/WEB-INF/jsp/alert.jsp</result>
- <result name="requires-authorization">/WEB-INF/jsp/alert.jsp</result>
-
- <!-- Generic Catchall for those action configurations that forget to
+ <result name="security-account-success" type="redirect-action">index</result>
+ <result name="security-account-cancel" type="redirect-action">
+ <param name="actionName">login</param>
+ <param name="namespace">/security</param>
+ </result>
+ <result name="security-admin-user-created" type="redirect-action">
+ <param name="actionName">login</param>
+ <param name="namespace">/security</param>
+ </result>
+ <result name="security-admin-user-needed" type="redirect-action">
+ <param name="actionName">addadmin</param>
+ <param name="namespace">/security</param>
+ </result>
+
+ <!-- Generic Catchall for those action configurations that forget to
include a result for 'error' -->
<result name="error">/WEB-INF/jsp/generalError.jsp</result>
</global-results>
@@ -93,24 +113,13 @@
<!-- Configuration for the default package. -->
<package name="default" extends="base" namespace="/">
- <interceptors>
- <interceptor name="configuration" class="configurationInterceptor"/>
- <interceptor-stack name="configuredStack">
- <interceptor-ref name="defaultStack"/>
- <interceptor-ref name="configuration"/>
- <interceptor-ref name="pssSecureActions"/>
- </interceptor-stack>
- </interceptors>
- <!-- Default interceptor stack. -->
- <default-interceptor-ref name="configuredStack"/>
-
- <!-- This is the redirection facility for plexus-security,
+ <!-- This is the redirection facility for plexus-security,
allowing plexus-security to call out from its own set of actions
into the application webapp, using global result names. -->
<action name="pssRedirect" class="pss-redirect" method="redirect">
<result type="redirect-action">browse</result>
- </action>
+ </action>
<action name="index" class="searchAction" method="input">
<result name="input">/WEB-INF/jsp/quickSearch.jsp</result>
@@ -158,7 +167,7 @@
<action name="showArtifactDependees" class="showArtifactAction" method="dependees">
<result>/WEB-INF/jsp/showArtifact.jsp</result>
</action>
-
+
<action name="showArtifactDependencyTree" class="showArtifactAction" method="dependencyTree">
<result>/WEB-INF/jsp/showArtifact.jsp</result>
</action>
@@ -176,25 +185,15 @@
<!-- Configuration for the admin package. -->
<package name="admin" namespace="/admin" extends="base">
-
+
<action name="index" class="configureAction" method="input">
<result name="input">/WEB-INF/jsp/admin/index.jsp</result>
</action>
-
- <action name="addadmin" class="addAdminAction" method="show">
- <interceptor-ref name="defaultStack"/>
- <result name="input">/WEB-INF/jsp/admin/createAdmin.jsp</result>
- <result name="error">/WEB-INF/jsp/admin/createAdmin.jsp</result>
- <result name="success" type="redirect-action">
- <param name="namespace">/</param>
- <param name="actionName">browse</param>
- </result>
- </action>
<action name="addRepository" class="configureRepositoryAction" method="add">
<result name="input">/WEB-INF/jsp/admin/addRepository.jsp</result>
<result type="redirect-action">index</result>
- <interceptor-ref name="defaultStack"/>
+ <interceptor-ref name="unconfiguredStack"/>
</action>
<action name="editRepository" class="configureRepositoryAction" method="edit">
@@ -258,13 +257,13 @@
<action name="configure" class="configureAction" method="input">
<result name="input">/WEB-INF/jsp/admin/configure.jsp</result>
- <interceptor-ref name="defaultStack"/>
+ <interceptor-ref name="unconfiguredStack"/>
</action>
<action name="saveConfiguration" class="configureAction">
<result name="input">/WEB-INF/jsp/admin/configure.jsp</result>
<result>/WEB-INF/jsp/admin/index.jsp</result>
- <interceptor-ref name="defaultStack"/>
+ <interceptor-ref name="unconfiguredStack"/>
</action>
<action name="runIndexer" class="runRepositoryTaskAction" method="runIndexer">