]> source.dussan.org Git - archiva.git/commitdiff
Changes for redback trunk (r656)
authorJames William Dumay <jdumay@apache.org>
Mon, 3 Nov 2008 02:16:13 +0000 (02:16 +0000)
committerJames William Dumay <jdumay@apache.org>
Mon, 3 Nov 2008 02:16:13 +0000 (02:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@710000 13f79535-47bb-0310-9956-ffa450edef68

33 files changed:
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditOrganisationInfoAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AbstractProxyConnectorAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/LegacyArtifactPathAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractRepositoriesAdminAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/reports/GenerateReportAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProvider.java
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/RepositoryServlet.java
archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/ArchivaDavSessionProviderTest.java
archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.java

index 4d73cd6a6398374049c2723882279538757bb46d..d11c9b6ef1bb0c228dbc3fe822b35adcae292ded 100644 (file)
@@ -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 );
index c598fef4c598ef4313eecff4052bdf77d389f6f7..c87a8b68a4626a9bbf96ccfde7c3eec2e47fe252 100644 (file)
@@ -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 <a href="mailto:brett@apache.org">Brett Porter</a>
index c0a5a79a2067d6db9391c81a4c51665087b3f264..e911365a8bc58043c6fadb4b4d3bca6568363bbe 100644 (file)
@@ -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 
index 34623ffcbd55b5a8ab7aabf326477c9c310f812a..149453284572a178c82e283a0435fb78378a324d 100644 (file)
@@ -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
index f2378d6d3ffda12e1d1302b61d4dc5b13dc61cb0..4b21755b01d9ca39326a4d731914e48903b02bea 100644 (file)
@@ -30,13 +30,13 @@ import org.apache.maven.archiva.configuration.LegacyArtifactPath;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;\r
 import org.apache.maven.archiva.web.util.ContextUtils;\r
 import org.codehaus.plexus.redback.rbac.Resource;\r
-import org.codehaus.plexus.redback.struts2.interceptor.SecureAction;\r
-import org.codehaus.plexus.redback.struts2.interceptor.SecureActionBundle;\r
-import org.codehaus.plexus.redback.struts2.interceptor.SecureActionException;\r
 \r
 import org.apache.struts2.interceptor.ServletRequestAware;\r
 import com.opensymphony.xwork2.Preparable;\r
 import org.apache.maven.archiva.web.action.PlexusActionSupport;\r
+import org.codehaus.redback.integration.interceptor.SecureAction;\r
+import org.codehaus.redback.integration.interceptor.SecureActionBundle;\r
+import org.codehaus.redback.integration.interceptor.SecureActionException;\r
 \r
 /**\r
  * Shows the LegacyArtifactPath Tab for the administrator.\r
index e2048c3573c21d825e29862c3ac4e51d657acaeb..78ea32005063f6ff4ece9cae5397611304b39c15 100644 (file)
@@ -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
index a75a7b83b03b9446c728ddad01dfac9db2498bac..2a51dd7c1ef4694d533ee6ecc92005caedbed737 100644 (file)
@@ -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;
 
index 48430c78da6642f676a3be7f3c8b67688a9cfcb2..2ffd3988559203b397ba8183f7ea65972101c7f9 100644 (file)
@@ -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;
index 20d7d54b836a1c5a09357a5e8592c8a059baa8cb..53946130af6a81060dc80a8f451b30bc54b154d5 100644 (file)
@@ -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;
index b79ffb7d4e1d7e4fd7f790c8657c806011fae9ba..850e7e8904153cc55d77363082d1793eb9d9ca03 100644 (file)
@@ -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;
index eb003cfda4e462f2247466c9758df4da7d164aad..4d4a1f6061d3179f3133261a60b9ec2153a43ca2 100644 (file)
@@ -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"
index d047eaf65d53e69b35681e216c59893a76da615b..913955dfabb2880d4f569b46c4e5b749a3cc315d 100644 (file)
@@ -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 ) )
index 8f35ec74cc8d0bb40bea80235252a9812f4666a0..b4ece7482563171e848aa32264281d8548625e2b 100644 (file)
@@ -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;
 
index b92e8e2971f518abb40e9a61e48f026e49a26df6..cf52ea2938d4cfa41092f3034fd022b5bb7f7121 100644 (file)
@@ -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;
 
index 451c02366ad546a15751f8eef1b07ff51b58cedf..b510a144d1bcf6039d0ab4d5a446cbaccf4ddefb 100644 (file)
@@ -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;
 
index cafc8ebc5d345673465db97896db0a2e3d6e55e2..48f9a117138939aba735a9c6bad875ece5521c2b 100644 (file)
@@ -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;
 
index 5afbb7b2934e0dbb99b3f3dc36438aa309e70eed..0f6422f2b6310b9d75cfcfd1966abd1025c829c2 100644 (file)
@@ -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
index ad37f07afef457f0ca6d8ca541865a1a99385ef3..9467999533ccd7d8190ed74596ab587145039809 100644 (file)
@@ -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;
 
index 2f5615dc9e756a7d91eaf74884a9570b8350234d..d2ac9b71ebc15e5de22cb3e5c01e77e8a016eb1e 100644 (file)
@@ -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;
 
index 2c7e9be5f2dfcc44162c8b9902da8cc9bfe4b61b..a38b06c30d0773707370cb5b607bcb256d169eb4 100644 (file)
@@ -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;
 
index 263efe7156672379833ae2991aab5a764199e654..1a1cad8a019013fe50320aa1756a4b084cbc1437 100644 (file)
@@ -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;
 
index a18374692767b9ab408ea00545ff078e74e7e1db..de2ee10d833861c1c46ab76c0795a1a66ad1313c 100644 (file)
@@ -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;
index ffcac5dc22d4595bf7813c4b2d5603464c16c561..655c26f8b02f81cab65c9b81158a0cf33a6b74a5 100644 (file)
@@ -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;
 
index b02afc47bdc35fe735365b386bcecbe5c63a7cc6..aa1aee5e66ecd331ceaaf41d33906c90a2f38ead 100644 (file)
@@ -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;
 
index 85f8909f31ca2b8623b916f367fd28b2f9383953..2bd4b1f7f1523bc1514c668d3007ddce04029454 100644 (file)
@@ -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;
 
index 5440d23d7bbe21b7b1b28714ac95dcf7a9ea9c83..66857a46161aa0cc861c459a4667016eee355ef2 100644 (file)
@@ -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;
 
 /**
index 5918b336ef0352aa6b549b18bad37135e8915cf5..4e44945a8f03acd695feb000ee9ed698917aa725 100644 (file)
@@ -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;
 
index e5783d42a324a81d29bd420823405f9d380ab42a..9d606c70619c934ebe4c6e45497b23827327e729 100644 (file)
@@ -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;
 
index 14645f61858e2ff70bf252e19d4acdf7940a1612..1abf8242dec09d054651bb57aab0b22475a587ce 100644 (file)
@@ -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 )
             {
index e06d33176a346439bfea6e81e7cda178600849b5..4f1b8d5003177f31975c1c0618f48e6e81db65a6 100644 (file)
@@ -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;
 
index d8b1d98e8d8bdebcb56e8d8a781b682ad46b0f80..a78b26be1160d529870da1ad934b973d8be9a4a5 100644 (file)
@@ -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;
index 4d0bc445c7fa708bead498a05ccdec7ec5f9145d..20a8543f95728c5e02906142ab26726b525f9153 100644 (file)
@@ -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);
+        }        
     }
 }
index 5e1b006975d64f8546ddc6936b2877de791c6efc..dcf62d321e22e540135018f142cfd5e25d8dff70 100644 (file)
@@ -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." ) );