From 5e04d6c1a2c85b2f20c2fdbe6ec5fffcf00d82dd Mon Sep 17 00:00:00 2001 From: James William Dumay Date: Mon, 3 Nov 2008 02:16:13 +0000 Subject: [PATCH] Changes for redback trunk (r656) git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@710000 13f79535-47bb-0310-9956-ffa450edef68 --- .../web/action/admin/SchedulerAction.java | 8 ++-- .../EditOrganisationInfoAction.java | 7 ++- .../proxy/AbstractProxyConnectorAction.java | 6 +-- .../action/admin/database/DatabaseAction.java | 6 +-- .../legacy/LegacyArtifactPathAction.java | 6 +-- .../ConfigureNetworkProxyAction.java | 6 +-- .../networkproxies/NetworkProxiesAction.java | 6 +-- .../AbstractRepositoriesAdminAction.java | 6 +-- .../repositories/RepositoriesAction.java | 6 +-- .../scanning/RepositoryScanningAction.java | 6 +-- .../action/reports/GenerateReportAction.java | 6 +-- .../maven/archiva/web/rss/RssFeedServlet.java | 5 +-- .../proxy/AddProxyConnectorActionTest.java | 2 +- .../proxy/DeleteProxyConnectorActionTest.java | 2 +- .../DisableProxyConnectorActionTest.java | 2 +- .../proxy/EditProxyConnectorActionTest.java | 2 +- .../proxy/EnableProxyConnectorActionTest.java | 2 +- .../proxy/ProxyConnectorsActionTest.java | 2 +- .../proxy/SortProxyConnectorsActionTest.java | 2 +- .../AddManagedRepositoryActionTest.java | 4 +- .../AddRemoteRepositoryActionTest.java | 4 +- .../DeleteManagedRepositoryActionTest.java | 4 +- .../DeleteRepositoryGroupActionTest.java | 4 +- .../EditManagedRepositoryActionTest.java | 4 +- .../EditRemoteRepositoryActionTest.java | 4 +- .../repositories/RepositoriesActionTest.java | 4 +- .../RepositoryGroupsActionTest.java | 4 +- .../SortRepositoriesActionTest.java | 4 +- .../webdav/ArchivaDavResourceFactory.java | 9 ++-- .../webdav/ArchivaDavSessionProvider.java | 12 ++--- .../archiva/webdav/RepositoryServlet.java | 2 +- .../webdav/ArchivaDavSessionProviderTest.java | 44 +++++-------------- .../webdav/RepositoryServletSecurityTest.java | 18 ++++---- 33 files changed, 93 insertions(+), 116 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java index 4d73cd6a6..d11c9b6ef 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java @@ -29,10 +29,10 @@ import org.apache.maven.archiva.scheduled.tasks.RepositoryTask; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.codehaus.plexus.taskqueue.TaskQueueException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * Configures the application. @@ -153,12 +153,14 @@ public class SchedulerAction return SUCCESS; } + @Override public void addActionMessage( String aMessage ) { super.addActionMessage( aMessage ); getLogger().info( "[ActionMessage] " + aMessage ); } + @Override public void addActionError( String anErrorMessage ) { super.addActionError( anErrorMessage ); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditOrganisationInfoAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditOrganisationInfoAction.java index c598fef4c..c87a8b68a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditOrganisationInfoAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditOrganisationInfoAction.java @@ -19,16 +19,15 @@ package org.apache.maven.archiva.web.action.admin.appearance; * under the License. */ -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; - import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.IndeterminateConfigurationException; import org.apache.maven.archiva.configuration.OrganisationInformation; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * @author Brett Porter diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorAction.java index c0a5a79a2..e911365a8 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorAction.java @@ -30,13 +30,13 @@ import org.apache.maven.archiva.configuration.functors.ProxyConnectorSelectionPr import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import java.util.List; import java.util.Map; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * AbstractProxyConnectorAction diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java index 34623ffcb..149453284 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java @@ -30,13 +30,13 @@ import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.admin.scanning.AdminRepositoryConsumerComparator; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import java.util.Collections; import java.util.List; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * DatabaseAction diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/LegacyArtifactPathAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/LegacyArtifactPathAction.java index f2378d6d3..4b21755b0 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/LegacyArtifactPathAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/LegacyArtifactPathAction.java @@ -30,13 +30,13 @@ import org.apache.maven.archiva.configuration.LegacyArtifactPath; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.util.ContextUtils; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.apache.struts2.interceptor.ServletRequestAware; import com.opensymphony.xwork2.Preparable; import org.apache.maven.archiva.web.action.PlexusActionSupport; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * Shows the LegacyArtifactPath Tab for the administrator. diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java index e2048c357..78ea32005 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java @@ -31,10 +31,10 @@ import org.apache.maven.archiva.configuration.functors.NetworkProxySelectionPred import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * ConfigureNetworkProxyAction diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java index a75a7b83b..2a51dd7c1 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java @@ -25,9 +25,9 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import java.util.List; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java index 48430c78d..2ffd39885 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java @@ -25,9 +25,9 @@ import org.apache.maven.archiva.configuration.IndeterminateConfigurationExceptio import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import java.util.ArrayList; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java index 20d7d54b8..53946130a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java @@ -33,9 +33,9 @@ import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.util.ContextUtils; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java index b79ffb7d4..850e7e890 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java @@ -35,9 +35,9 @@ import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.codehaus.plexus.redback.rbac.Resource; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import java.util.ArrayList; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java index eb003cfda..4d4a1f606 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java @@ -64,9 +64,9 @@ import java.util.Map; import java.util.TreeMap; import org.apache.maven.archiva.web.action.PlexusActionSupport; import org.apache.struts2.interceptor.ServletRequestAware; -import org.codehaus.plexus.redback.struts2.interceptor.SecureAction; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureAction; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; /** * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="generateReport" diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java index d047eaf65..913955dfa 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java @@ -38,7 +38,6 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.StringUtils; import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.security.AccessDeniedException; -import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.apache.maven.archiva.security.ArchivaSecurityException; import org.apache.maven.archiva.security.ArchivaXworkUser; import org.apache.maven.archiva.security.PrincipalNotFoundException; @@ -52,8 +51,8 @@ import org.codehaus.plexus.redback.policy.AccountLockedException; import org.codehaus.plexus.redback.policy.MustChangePasswordException; import org.codehaus.plexus.redback.system.SecuritySession; import org.codehaus.plexus.redback.users.UserNotFoundException; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; import org.codehaus.plexus.spring.PlexusToSpringUtils; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; @@ -296,7 +295,7 @@ public class RssFeedServlet try { AuthenticationResult result = httpAuth.getAuthenticationResult( req, null ); - SecuritySession securitySession = httpAuth.getSecuritySession(); + SecuritySession securitySession = httpAuth.getSecuritySession( req.getSession( true ) ); if ( servletAuth.isAuthenticated( req, result ) && servletAuth.isAuthorized( req, securitySession, repoId, false ) ) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.java index 8f35ec74c..b4ece7482 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.java @@ -33,7 +33,7 @@ import org.apache.maven.archiva.policies.PropagateErrorsOnUpdateDownloadPolicy; import org.apache.maven.archiva.policies.ReleasesPolicy; import org.apache.maven.archiva.policies.SnapshotsPolicy; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.java index b92e8e297..cf52ea293 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.java @@ -28,7 +28,7 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java index 451c02366..b510a144d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java @@ -25,7 +25,7 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.java index cafc8ebc5..48f9a1171 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.java @@ -33,7 +33,7 @@ import org.apache.maven.archiva.policies.PropagateErrorsOnUpdateDownloadPolicy; import org.apache.maven.archiva.policies.ReleasesPolicy; import org.apache.maven.archiva.policies.SnapshotsPolicy; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.java index 5afbb7b29..0f6422f2b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.java @@ -25,8 +25,8 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.easymock.MockControl; public class EnableProxyConnectorActionTest extends AbstractWebworkTestCase diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.java index ad37f07af..946799953 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.java @@ -28,7 +28,7 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java index 2f5615dc9..d2ac9b71e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java @@ -30,7 +30,7 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; import org.apache.maven.archiva.configuration.functors.ProxyConnectorConfigurationOrderComparator; import org.apache.maven.archiva.web.action.AbstractWebworkTestCase; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; import org.codehaus.plexus.registry.RegistryException; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java index 2c7e9be5f..a38b06c30 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java @@ -26,8 +26,8 @@ import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.redback.role.RoleManager; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java index 263efe715..1a1cad8a0 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java @@ -23,8 +23,8 @@ import com.opensymphony.xwork2.Action; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java index a18374692..de2ee10d8 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java @@ -31,8 +31,8 @@ import org.apache.maven.archiva.model.ArchivaProjectModel; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.redback.role.RoleManager; import org.codehaus.plexus.redback.role.RoleManagerException; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.registry.RegistryException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java index ffcac5dc2..655c26f8b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java @@ -25,8 +25,8 @@ import com.opensymphony.xwork2.Action; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java index b02afc47b..aa1aee5e6 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java @@ -25,8 +25,8 @@ import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.security.ArchivaRoleConstants; import org.codehaus.plexus.redback.role.RoleManager; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java index 85f8909f3..2bd4b1f7f 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java @@ -23,8 +23,8 @@ import com.opensymphony.xwork2.Action; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.java index 5440d23d7..66857a461 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.java @@ -22,8 +22,8 @@ package org.apache.maven.archiva.web.action.admin.repositories; import com.meterware.servletunit.ServletRunner; import com.meterware.servletunit.ServletUnitClient; import com.opensymphony.xwork2.Action; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; /** diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java index 5918b336e..4e44945a8 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java @@ -25,8 +25,8 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java index e5783d42a..9d606c706 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java @@ -22,8 +22,8 @@ package org.apache.maven.archiva.web.action.admin.repositories; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle; -import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException; +import org.codehaus.redback.integration.interceptor.SecureActionBundle; +import org.codehaus.redback.integration.interceptor.SecureActionException; import org.codehaus.plexus.spring.PlexusInSpringTestCase; import org.easymock.MockControl; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java index 14645f618..1abf8242d 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java @@ -46,7 +46,6 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; import org.apache.maven.archiva.model.ArchivaRepositoryMetadata; import org.apache.maven.archiva.model.ArtifactReference; -import org.apache.maven.archiva.model.ProjectReference; import org.apache.maven.archiva.model.VersionedReference; import org.apache.maven.archiva.policies.ProxyDownloadException; import org.apache.maven.archiva.proxy.RepositoryProxyConnectors; @@ -85,8 +84,8 @@ import org.codehaus.plexus.redback.policy.AccountLockedException; import org.codehaus.plexus.redback.policy.MustChangePasswordException; import org.codehaus.plexus.redback.system.SecuritySession; import org.codehaus.plexus.redback.system.SecuritySystemConstants; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -726,7 +725,7 @@ public class ArchivaDavResourceFactory try { AuthenticationResult result = httpAuth.getAuthenticationResult( request, null ); - SecuritySession securitySession = httpAuth.getSecuritySession(); + SecuritySession securitySession = httpAuth.getSecuritySession( request.getSession( true ) ); return servletAuth.isAuthenticated( request, result ) && servletAuth.isAuthorized( request, securitySession, repositoryId, @@ -803,7 +802,7 @@ public class ArchivaDavResourceFactory for( String repository : repositories ) { // for prompted authentication - if( httpAuth.getSecuritySession() != null ) + if( httpAuth.getSecuritySession( request.getSession( true ) ) != null ) { try { @@ -894,7 +893,7 @@ public class ArchivaDavResourceFactory // if securitySession != null, it means that the user was prompted for authentication - if( httpAuth.getSecuritySession() != null ) + if( httpAuth.getSecuritySession( request.getSession() ) != null ) { for( String repository : repositories ) { diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProvider.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProvider.java index e06d33176..4f1b8d500 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProvider.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProvider.java @@ -19,20 +19,20 @@ package org.apache.maven.archiva.webdav; * under the License. */ -import org.apache.jackrabbit.webdav.DavSessionProvider; -import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavServletRequest; -import org.apache.maven.archiva.webdav.util.RepositoryPathUtil; -import org.apache.maven.archiva.webdav.util.WebdavMethodUtil; +import org.apache.jackrabbit.webdav.DavSessionProvider; +import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.maven.archiva.security.ArchivaXworkUser; import org.apache.maven.archiva.security.ServletAuthenticator; +import org.apache.maven.archiva.webdav.util.RepositoryPathUtil; +import org.apache.maven.archiva.webdav.util.WebdavMethodUtil; import org.codehaus.plexus.redback.authentication.AuthenticationException; import org.codehaus.plexus.redback.authentication.AuthenticationResult; import org.codehaus.plexus.redback.authorization.UnauthorizedException; -import org.codehaus.plexus.redback.policy.MustChangePasswordException; import org.codehaus.plexus.redback.policy.AccountLockedException; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; +import org.codehaus.plexus.redback.policy.MustChangePasswordException; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/RepositoryServlet.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/RepositoryServlet.java index d8b1d98e8..a78b26be1 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/RepositoryServlet.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/RepositoryServlet.java @@ -46,8 +46,8 @@ import org.apache.maven.archiva.configuration.ConfigurationListener; import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; import org.apache.maven.archiva.security.ArchivaXworkUser; import org.apache.maven.archiva.security.ServletAuthenticator; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; import org.codehaus.plexus.spring.PlexusToSpringUtils; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.context.WebApplicationContext; diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProviderTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProviderTest.java index 4d0bc445c..20a8543f9 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProviderTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProviderTest.java @@ -26,13 +26,16 @@ import java.security.Principal; import java.util.Enumeration; import java.util.Locale; import java.util.Map; + import javax.servlet.RequestDispatcher; import javax.servlet.ServletInputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; + import junit.framework.TestCase; + import org.apache.jackrabbit.webdav.DavSessionProvider; import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.WebdavRequestImpl; @@ -46,7 +49,7 @@ import org.codehaus.plexus.redback.policy.AccountLockedException; import org.codehaus.plexus.redback.policy.MustChangePasswordException; import org.codehaus.plexus.redback.system.SecuritySession; import org.codehaus.plexus.redback.users.User; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; public class ArchivaDavSessionProviderTest extends TestCase { @@ -387,7 +390,7 @@ public class ArchivaDavSessionProviderTest extends TestCase @Override - public AuthenticationResult authenticate(AuthenticationDataSource arg0) + public AuthenticationResult authenticate(AuthenticationDataSource arg0, HttpSession httpSession) throws AuthenticationException, AccountLockedException, MustChangePasswordException { return new AuthenticationResult(); @@ -401,44 +404,21 @@ public class ArchivaDavSessionProviderTest extends TestCase } @Override - public Map getContextSession() - { - return super.getContextSession(); - } - - @Override - public SecuritySession getSecuritySession() + public SecuritySession getSecuritySession(HttpSession httpSession) { - return super.getSecuritySession(); + return super.getSecuritySession(httpSession); } @Override - public User getSessionUser() + public User getSessionUser(HttpSession httpSession) { - return super.getSessionUser(); + return super.getSessionUser(httpSession); } @Override - public boolean isAlreadyAuthenticated() + public boolean isAlreadyAuthenticated(HttpSession httpSession) { - return super.isAlreadyAuthenticated(); - } - - @Override - public void setSecuritySession(SecuritySession session) - { - super.setSecuritySession(session); - } - - @Override - public void setSessionUser(User user) { - super.setSessionUser(user); - } - - @Override - public String storeDefaultUser(String user) { - return super.storeDefaultUser(user); - } - + return super.isAlreadyAuthenticated(httpSession); + } } } diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.java index 5e1b00697..dcf62d321 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.java @@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletResponse; import net.sf.ehcache.CacheManager; import org.apache.commons.io.FileUtils; -import org.apache.jackrabbit.webdav.DavResourceFactory; import org.apache.jackrabbit.webdav.DavSessionProvider; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.Configuration; @@ -40,12 +39,11 @@ import org.codehaus.plexus.redback.authentication.AuthenticationResult; import org.codehaus.plexus.redback.authorization.UnauthorizedException; import org.codehaus.plexus.redback.system.DefaultSecuritySession; import org.codehaus.plexus.redback.system.SecuritySession; -import org.codehaus.plexus.redback.struts2.filter.authentication.HttpAuthenticator; -import org.codehaus.plexus.redback.struts2.filter.authentication.basic.HttpBasicAuthentication; import org.codehaus.plexus.spring.PlexusInSpringTestCase; +import org.codehaus.redback.integration.filter.authentication.HttpAuthenticator; +import org.codehaus.redback.integration.filter.authentication.basic.HttpBasicAuthentication; import org.easymock.MockControl; import org.easymock.classextension.MockClassControl; -import org.easymock.internal.AlwaysMatcher; import com.meterware.httpunit.GetMethodWebRequest; import com.meterware.httpunit.HttpUnitOptions; @@ -265,7 +263,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true) ), session ); servletAuthControl.expectAndThrow( servletAuth.isAuthenticated( null, result ), new AuthenticationException( "Authentication error" ) ); @@ -313,7 +311,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true ) ), session ); servletAuthControl.expectAndReturn( servletAuth.isAuthenticated( null, result ), true ); servletAuthControl.expectAndThrow( servletAuth.isAuthorized( null, session, "internal", true ), new UnauthorizedException( "User not authorized" ) ); @@ -359,7 +357,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true ) ), session ); servletAuthControl.expectAndReturn( servletAuth.isAuthenticated( null, result ), true ); servletAuthControl.expectAndReturn( servletAuth.isAuthorized( null, session, "internal", true ), true ); @@ -406,7 +404,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true ) ), session ); servletAuthControl.expectAndReturn( servletAuth.isAuthenticated( null, result ), true ); servletAuthControl.expectAndReturn( servletAuth.isAuthorized( null, session, "internal", true ), true ); @@ -486,7 +484,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true ) ), session ); servletAuthControl.expectAndReturn( servletAuth.isAuthenticated( null, result ), true ); servletAuthControl.expectAndReturn( servletAuth.isAuthorized( null, session, "internal", true ), true ); @@ -532,7 +530,7 @@ public class RepositoryServletSecurityTest // ArchivaDavResourceFactory#isAuthorized() SecuritySession session = new DefaultSecuritySession(); httpAuthControl.expectAndReturn( httpAuth.getAuthenticationResult( null, null ), result ); - httpAuthControl.expectAndReturn( httpAuth.getSecuritySession(), session ); + httpAuthControl.expectAndReturn( httpAuth.getSecuritySession( ic.getRequest().getSession( true ) ), session ); servletAuthControl.expectAndReturn( servletAuth.isAuthenticated( null, result ), true ); servletAuthControl.expectAndThrow( servletAuth.isAuthorized( null, session, "internal", true ), new UnauthorizedException( "User not authorized to read repository." ) ); -- 2.39.5