maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From handya...@apache.org
Subject svn commit: r541604 - in /maven/sandbox/trunk/enterprise/enterprise-web: pom.xml src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
Date Fri, 25 May 2007 09:46:03 GMT
Author: handyande
Date: Fri May 25 02:45:58 2007
New Revision: 541604

URL: http://svn.apache.org/viewvc?view=rev&rev=541604
Log:
Use the jee-web-integration which works when we do not use xwork :)

Modified:
    maven/sandbox/trunk/enterprise/enterprise-web/pom.xml
    maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java
    maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java

Modified: maven/sandbox/trunk/enterprise/enterprise-web/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/enterprise/enterprise-web/pom.xml?view=diff&rev=541604&r1=541603&r2=541604
==============================================================================
--- maven/sandbox/trunk/enterprise/enterprise-web/pom.xml (original)
+++ maven/sandbox/trunk/enterprise/enterprise-web/pom.xml Fri May 25 02:45:58 2007
@@ -24,44 +24,44 @@
       <version>1.0-alpha-2</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-authorization-rbac-store-jdo</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-rbac-jdo</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-authentication-provider-keystore</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-authentication-keys</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-keys-jdo</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-keys-jdo</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-authentication-provider-user-manager</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-authentication-users</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-user-management-provider-jdo</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-users-jdo</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-authorization-rbac-authorizer</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-authorization-rbac</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-system</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-system</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-ui-web-integration</artifactId>
-      <version>${securityVersion}</version>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-jee-web-integration</artifactId>
+      <version>${redbackVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -81,6 +81,18 @@
   </dependencies>
 
   <properties>
-    <securityVersion>1.0-alpha-11</securityVersion>
+    <redbackVersion>1.0-alpha-2-SNAPSHOT</redbackVersion>
   </properties>
+
+  <!-- we need this for latest redback snapshots -->
+  <repositories>
+    <repository>
+      <id>codehaus.snapshots</id>
+      <name>Codehaus Snapshot Repository</name>
+      <url>http://snapshots.repository.codehaus.org/</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
 </project>

Modified: maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java?view=diff&rev=541604&r1=541603&r2=541604
==============================================================================
--- maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java
(original)
+++ maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseIDiskWebDavServlet.java
Fri May 25 02:45:58 2007
@@ -2,7 +2,7 @@
 
 import org.codehaus.plexus.webdav.servlet.DavServerRequest;
 import org.codehaus.plexus.webdav.util.WebdavMethodUtil;
-import org.codehaus.plexus.security.authentication.AuthenticationException;
+import org.codehaus.plexus.redback.authentication.AuthenticationException;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
@@ -51,11 +51,12 @@
 
         if ( authenticated )
         {
-            if ( httpAuth.getSessionUser() != null )
+            HttpServletRequest request = davRequest.getRequest();
+
+            if ( httpAuth.getSessionUser( request.getSession() ) != null )
             {
-                String user = httpAuth.getSecuritySession().getUser().getUsername();
+                String user = httpAuth.getSecuritySession( request.getSession() ).getUser().getUsername();
 
-                HttpServletRequest request = davRequest.getRequest();
                 if ( request.getPathInfo().equals( "/" + user ) ||
                     request.getPathInfo().startsWith( "/" + user + "/" ) )
                 {
@@ -91,7 +92,7 @@
         }
 
         String resource = davRequest.getLogicalResource();
-        String user = httpAuth.getSessionUser().getUsername();
+        String user = httpAuth.getSessionUser( request.getSession() ).getUsername();
 
         if ( resource.equals( "/" + user ) || resource.startsWith( "/" + user + "/" ) ||
             resource.equals( "/.DS_Store") ) // Hush little apple, let folk write root metadata

Modified: maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java?view=diff&rev=541604&r1=541603&r2=541604
==============================================================================
--- maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
(original)
+++ maven/sandbox/trunk/enterprise/enterprise-web/src/main/java/org/apache/maven/enterprise/web/EnterpriseWebDavServlet.java
Fri May 25 02:45:58 2007
@@ -3,11 +3,12 @@
 import org.codehaus.plexus.webdav.servlet.basic.BasicWebDavServlet;
 import org.codehaus.plexus.webdav.servlet.DavServerRequest;
 import org.codehaus.plexus.webdav.util.WebdavMethodUtil;
-import org.codehaus.plexus.security.authentication.AuthenticationResult;
-import org.codehaus.plexus.security.authentication.AuthenticationException;
-import org.codehaus.plexus.security.policy.AccountLockedException;
-import org.codehaus.plexus.security.policy.MustChangePasswordException;
-import org.codehaus.plexus.security.ui.web.filter.authentication.HttpAuthenticator;
+import org.codehaus.plexus.redback.authentication.AuthenticationResult;
+import org.codehaus.plexus.redback.authentication.AuthenticationException;
+import org.codehaus.plexus.redback.policy.AccountLockedException;
+import org.codehaus.plexus.redback.policy.MustChangePasswordException;
+import org.codehaus.plexus.redback.http.authentication.HttpAuthenticator;
+import org.codehaus.plexus.redback.http.authentication.SessionBasedHttpAuthenticator;
 import org.codehaus.plexus.util.StringUtils;
 import org.apache.maven.enterprise.model.EnterpriseConfig;
 
@@ -31,7 +32,7 @@
 public class  EnterpriseWebDavServlet
     extends BasicWebDavServlet
 {
-    protected HttpAuthenticator httpAuth;
+    protected SessionBasedHttpAuthenticator httpAuth;
 
     protected File enterpriseDavRoot;
 
@@ -71,7 +72,7 @@
         setDebug(false); // TODO perhaps debug should be off by default?
         super.initComponents();
 
-        httpAuth = (HttpAuthenticator) lookup( HttpAuthenticator.ROLE, "basic" );
+        httpAuth = (SessionBasedHttpAuthenticator) lookup( HttpAuthenticator.ROLE, "basic"
);
 
         String plexusHome = "";
 



Mime
View raw message