]> source.dussan.org Git - archiva.git/commitdiff
redback integration, and added test case to archiva-security
authorJesse McConnell <jmcconnell@apache.org>
Thu, 10 May 2007 22:09:39 +0000 (22:09 +0000)
committerJesse McConnell <jmcconnell@apache.org>
Thu, 10 May 2007 22:09:39 +0000 (22:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@537013 13f79535-47bb-0310-9956-ffa450edef68

41 files changed:
archiva-web/archiva-security/pom.xml
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaGuestRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaRoleProfileManager.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaSystemAdministratorRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaUserAdministratorRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryManagerRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryObserverRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java [deleted file]
archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RoleProfileEnvironmentCheck.java [deleted file]
archiva-web/archiva-security/src/main/resources/META-INF/plexus/components.xml [deleted file]
archiva-web/archiva-security/src/main/resources/META-INF/redback/redback.xml
archiva-web/archiva-security/src/test/java/org/apache/maven/archiva/security/RoleManagerTest.java [new file with mode: 0644]
archiva-web/archiva-security/src/test/resources/META-INF/plexus/components.xml [new file with mode: 0644]
archiva-web/archiva-webapp/pom.xml
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ReportsAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/ConfigureAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/IndexRepositoryAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/ConfigureAppearanceAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/EditPomAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/ConfigureRepositoryAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/check/RoleExistanceEnvironmentCheck.java
archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/RepositoryServlet.java
archiva-web/archiva-webapp/src/main/resources/xwork.xml
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/database.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositoryScanning.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/browse.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/reports/reports.jsp
archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp

index 6cc4661a4f8c5d8bd94fdf138bf947c8bb376692..81a977ed4b7b61e89756f760f89695358fff81d7 100644 (file)
   <name>Archiva Web :: Security Configuration</name>
   <dependencies>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-rbac-profile</artifactId>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-rbac-role-manager</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-system</artifactId>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-rbac-memory</artifactId>
+      <scope>test</scope>  
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-api</artifactId>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-xwork-integration</artifactId>
+      <scope>test</scope>
     </dependency>
   </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>merge</id>
-            <goals>
-              <goal>merge-descriptors</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>${basedir}/src/main/resources/META-INF/plexus/components.xml</descriptor>
-                <descriptor>${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
 </project>
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaGuestRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaGuestRoleProfile.java
deleted file mode 100644 (file)
index af264bc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @todo why does this need to be created in the client app?
- * @todo composition instead of inheritence?
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile" role-hint="archiva-guest"
- */
-public class ArchivaGuestRoleProfile
-    extends AbstractRoleProfile
-{
-    public String getRoleName()
-    {
-        return ArchivaRoleConstants.GUEST_ROLE;
-    }
-
-    public List getOperations()
-    {
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_ACTIVE_GUEST );
-        return operations;
-    }
-
-    public boolean isAssignable()
-    {
-        return false;
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaRoleProfileManager.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaRoleProfileManager.java
deleted file mode 100644 (file)
index f28444d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.DefaultRoleProfileManager;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-
-/**
- * Role profile manager.
- *
- * Role Structures are laid out as documented http://docs.codehaus.org/display/MAVENUSER/Archiva+Security+Roles
- *
- * @author Brett Porter
- * @todo composition over inheritence?
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfileManager" role-hint="archiva"
- */
-public class ArchivaRoleProfileManager
-    extends DefaultRoleProfileManager
-{
-    public void initialize()
-        throws RoleProfileException
-    {
-        getRole( "global-repository-manager" );
-        getRole( "global-repository-observer" );
-        
-        mergeRoleProfiles( "system-administrator", "archiva-system-administrator" );
-        mergeRoleProfiles( "user-administrator", "archiva-user-administrator" );
-        mergeRoleProfiles( "guest", "archiva-guest" );
-        setInitialized( true ); //todo remove the initialization idea from profile managers
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaSystemAdministratorRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaSystemAdministratorRoleProfile.java
deleted file mode 100644 (file)
index 4ea8e45..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @todo why does this need to be created in the client app?
- * @todo composition instead of inheritence?
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile" role-hint="archiva-system-administrator"
- */
-public class ArchivaSystemAdministratorRoleProfile
-    extends AbstractRoleProfile
-{
-    public String getRoleName()
-    {
-        return ArchivaRoleConstants.SYSTEM_ADMINISTRATOR_ROLE;
-    }
-
-    public List getOperations()
-    {
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION );
-        operations.add( ArchivaRoleConstants.OPERATION_MANAGE_USERS );
-        operations.add( ArchivaRoleConstants.OPERATION_RUN_INDEXER );
-        operations.add( ArchivaRoleConstants.OPERATION_REGENERATE_INDEX );
-        operations.add( ArchivaRoleConstants.OPERATION_ACCESS_REPORT ); // TODO: does this need to be templated?
-        // we don't add access/upload repository operations. This isn't a sys-admin function, and we don't want to
-        // encourage the use of the sys admin role for such operations. They can grant it as necessary.
-        return operations;
-    }
-    
-    
-    public List getChildRoles()
-    {     
-        List childRoles = new ArrayList();
-        childRoles.add( ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE );
-        return childRoles;
-    }
-
-    public boolean isAssignable()
-    {
-        return false;
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaUserAdministratorRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/ArchivaUserAdministratorRoleProfile.java
deleted file mode 100644 (file)
index f5f8e7f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @todo why does this need to be created in the client app?
- * @todo composition instead of inheritence?
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile" role-hint="archiva-user-administrator"
- */
-public class ArchivaUserAdministratorRoleProfile
-    extends AbstractRoleProfile
-{
-    public String getRoleName()
-    {
-        return ArchivaRoleConstants.USER_ADMINISTRATOR_ROLE;
-    }
-
-    public List getOperations()
-    {
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_MANAGE_USERS );
-        return operations;
-    }
-
-    public boolean isAssignable()
-    {
-        return false;
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryManagerRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryManagerRoleProfile.java
deleted file mode 100644 (file)
index 50bcfbb..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile"
- * role-hint="global-repository-manager"
- */
-public class GlobalRepositoryManagerRoleProfile
-    extends AbstractRoleProfile
-{
-    /**
-     * Create the Role name for a Repository Observer, using the provided repository id.
-     *
-     * @param repoId the repository id
-     */
-    public String getRoleName( )
-    {
-        return ArchivaRoleConstants.GLOBAL_REPOSITORY_MANAGER_ROLE;
-    }  
-
-    public boolean isAssignable()
-    {
-        return true;
-    }
-
-    public List getOperations()
-    {      
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION );
-        operations.add( ArchivaRoleConstants.OPERATION_ADD_REPOSITORY );
-        operations.add( ArchivaRoleConstants.OPERATION_EDIT_REPOSITORY );
-        operations.add( ArchivaRoleConstants.OPERATION_DELETE_REPOSITORY );
-        return operations;
-    }
-
-    public List getChildRoles()
-    {
-        List childRoles = new ArrayList();
-        childRoles.add( ArchivaRoleConstants.GLOBAL_REPOSITORY_OBSERVER_ROLE );
-        return childRoles;
-    }
-    
-    
-    
-    
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryObserverRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/GlobalRepositoryObserverRoleProfile.java
deleted file mode 100644 (file)
index defd5e0..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractRoleProfile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @plexus.component role="org.codehaus.plexus.rbac.profile.RoleProfile"
- * role-hint="global-repository-observer"
- */
-public class GlobalRepositoryObserverRoleProfile
-    extends AbstractRoleProfile
-{
-    /**
-     * Create the Role name for a Repository Observer, using the provided repository id.
-     *
-     * @param repoId the repository id
-     */
-    public String getRoleName( )
-    {
-        return ArchivaRoleConstants.GLOBAL_REPOSITORY_OBSERVER_ROLE;
-    }  
-
-    public boolean isAssignable()
-    {
-        return true;
-    }
-
-    public List getOperations()
-    {      
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS );
-        return operations;
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryManagerDynamicRoleProfile.java
deleted file mode 100644 (file)
index a9b6510..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractDynamicRoleProfile;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-import org.codehaus.plexus.security.rbac.RbacManagerException;
-import org.codehaus.plexus.security.rbac.RbacObjectNotFoundException;
-import org.codehaus.plexus.security.rbac.Role;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @plexus.component role="org.codehaus.plexus.rbac.profile.DynamicRoleProfile"
- * role-hint="archiva-repository-manager"
- */
-public class RepositoryManagerDynamicRoleProfile
-    extends AbstractDynamicRoleProfile
-{
-    /**
-     * Create the Role name for a Repository Manager, using the provided repository id.
-     *
-     * @param repoId the repository id
-     */
-    public String getRoleName( String repoId )
-    {
-        return ArchivaRoleConstants.REPOSITORY_MANAGER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + repoId;
-    }
-
-    public List getOperations()
-    {
-        List operations = new ArrayList();
-
-        operations.add( ArchivaRoleConstants.OPERATION_EDIT_REPOSITORY );
-        operations.add( ArchivaRoleConstants.OPERATION_DELETE_REPOSITORY );
-        operations.add( ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS );
-        operations.add( ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD );
-        return operations;
-    }
-
-    public boolean isAssignable()
-    {
-        return true;
-    }
-   
-}
-
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RepositoryObserverDynamicRoleProfile.java
deleted file mode 100644 (file)
index d49affe..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.rbac.profile.AbstractDynamicRoleProfile;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-import org.codehaus.plexus.security.rbac.RbacManagerException;
-import org.codehaus.plexus.security.rbac.RbacObjectNotFoundException;
-import org.codehaus.plexus.security.rbac.Role;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @plexus.component role="org.codehaus.plexus.rbac.profile.DynamicRoleProfile"
- * role-hint="archiva-repository-observer"
- */
-public class RepositoryObserverDynamicRoleProfile
-    extends AbstractDynamicRoleProfile
-{
-    /**
-     * Create the Role name for a Repository Observer, using the provided repository id.
-     *
-     * @param repoId the repository id
-     */
-    public String getRoleName( String repoId )
-    {
-        return ArchivaRoleConstants.REPOSITORY_OBSERVER_ROLE_PREFIX + ArchivaRoleConstants.DELIMITER + repoId;
-    }
-
-    public List getOperations()
-    {
-        List operations = new ArrayList();
-        operations.add( ArchivaRoleConstants.OPERATION_REPOSITORY_ACCESS );
-        return operations;
-    }
-
-    public boolean isAssignable()
-    {
-        return true;
-    }
-    
-}
diff --git a/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RoleProfileEnvironmentCheck.java b/archiva-web/archiva-security/src/main/java/org/apache/maven/archiva/security/RoleProfileEnvironmentCheck.java
deleted file mode 100644 (file)
index ff17486..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.apache.maven.archiva.security;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-import org.codehaus.plexus.rbac.profile.RoleProfileManager;
-import org.codehaus.plexus.security.system.check.EnvironmentCheck;
-
-import java.util.List;
-
-/**
- * @plexus.component role="org.codehaus.plexus.security.system.check.EnvironmentCheck"
- * role-hint="archiva-role-profile-check"
- * @todo isn't this standard? Shouldn't it be something initializable so it doesn't need to be checked all the time?
- */
-public class RoleProfileEnvironmentCheck
-    extends AbstractLogEnabled
-    implements EnvironmentCheck
-{
-    /**
-     * @plexus.requirement role-hint="archiva"
-     */
-    private RoleProfileManager roleProfileManager;
-
-    public void validateEnvironment( List list )
-    {
-        try
-        {
-            if ( !roleProfileManager.isInitialized() )
-            {
-                roleProfileManager.initialize();
-            }
-        }
-        catch ( RoleProfileException rpe )
-        {
-            list.add( "error inititalizing the role manager: " + rpe.getMessage() );
-        }
-    }
-}
diff --git a/archiva-web/archiva-security/src/main/resources/META-INF/plexus/components.xml b/archiva-web/archiva-security/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644 (file)
index e6e9286..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-
-<component-set>
-  <components>
-    <!-- TODO: wouldn't need to redeclare if it was composition -->
-    <!-- TODO: why is the container a requirement? -->
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfileManager</role>
-      <role-hint>archiva</role-hint>
-      <implementation>org.apache.maven.archiva.security.ArchivaRoleProfileManager</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-          <field-name>knownRoleProfiles</field-name>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
-          <field-name>knownDynamicRoleProfiles</field-name>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-      <role-hint>archiva-system-administrator</role-hint>
-      <implementation>org.apache.maven.archiva.security.ArchivaSystemAdministratorRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-      <role-hint>archiva-user-administrator</role-hint>
-      <implementation>org.apache.maven.archiva.security.ArchivaUserAdministratorRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-      <role-hint>archiva-guest</role-hint>
-      <implementation>org.apache.maven.archiva.security.ArchivaGuestRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-      <role-hint>global-repository-manager</role-hint>
-      <implementation>org.apache.maven.archiva.security.GlobalRepositoryManagerRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-      </requirements>
-    </component>
-        <component>
-      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
-      <role-hint>global-repository-observer</role-hint>
-      <implementation>org.apache.maven.archiva.security.GlobalRepositoryObserverRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-        <requirement>
-          <role>org.codehaus.plexus.PlexusContainer</role>
-          <field-name>container</field-name>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
-      <role-hint>archiva-repository-manager</role-hint>
-      <implementation>org.apache.maven.archiva.security.RepositoryManagerDynamicRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-      </requirements>
-    </component>
-    <component>
-      <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
-      <role-hint>archiva-repository-observer</role-hint>
-      <implementation>org.apache.maven.archiva.security.RepositoryObserverDynamicRoleProfile</implementation>
-      <requirements>
-        <requirement>
-          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
-          <role-hint>cached</role-hint>
-        </requirement>
-      </requirements>
-    </component>
-  </components>
-</component-set>
index 05d298b3b4028f044b218c7b6716592a773f2973..42670a0ad89b0ceb9c3cdd98b5feca24a475caed 100644 (file)
       <name>archiva-upload-repository</name>
       <description>Upload Archiva Repository</description>
     </operation>
+    <operation>
+      <id>archiva-access-repository</id>
+      <name>archiva-access-repository</name>
+      <description>Access Archiva Repository</description>
+    </operation>
     <operation>
       <id>archiva-guest</id>
       <name>archiva-guest</name>
-      <description>Upload Archiva Repository</description>
+      <description>Active Archiva Guest</description>
     </operation>
   </operations>
   <roles>
@@ -94,9 +99,9 @@
           <permanent>true</permanent>
         </permission>
         <permission>
-          <id>archiva-access-report</id>
-          <name>archiva-access-report</name>
-          <operation>archiva-access-report</operation>
+          <id>archiva-access-reports</id>
+          <name>archiva-access-reports</name>
+          <operation>archiva-access-reports</operation>
           <resource>global</resource>
           <permanent>true</permanent>
         </permission>
diff --git a/archiva-web/archiva-security/src/test/java/org/apache/maven/archiva/security/RoleManagerTest.java b/archiva-web/archiva-security/src/test/java/org/apache/maven/archiva/security/RoleManagerTest.java
new file mode 100644 (file)
index 0000000..2c44499
--- /dev/null
@@ -0,0 +1,58 @@
+package org.apache.maven.archiva.security;
+
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.redback.role.RoleManager;
+
+/**
+ * RoleProfilesTest 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id: RoleManagerTest.java 4330 2007-05-10 17:28:56Z jmcconnell $
+ */
+public class RoleManagerTest
+    extends PlexusTestCase
+{
+    /**
+     * @plexus.requirement role-hint="default"
+     */
+    RoleManager roleManager;
+    
+    protected void setUp()
+        throws Exception
+    {
+        super.setUp();
+        
+        roleManager = (RoleManager) lookup( RoleManager.ROLE, "default" );    
+    }
+    
+    public void testExpectedRoles()
+        throws Exception
+    {
+        assertNotNull( roleManager );
+        
+        assertTrue( roleManager.roleExists( "system-administrator" ) );
+        assertTrue( roleManager.roleExists( "user-administrator" ) );
+        assertTrue( roleManager.roleExists( "archiva-global-repository-observer" ) );
+        assertTrue( roleManager.roleExists( "archiva-guest" ) );        
+        assertTrue( roleManager.roleExists( "guest" ) );
+    }
+}
diff --git a/archiva-web/archiva-security/src/test/resources/META-INF/plexus/components.xml b/archiva-web/archiva-security/src/test/resources/META-INF/plexus/components.xml
new file mode 100644 (file)
index 0000000..65ede81
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" ?>
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.redback.role.RoleManager</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.redback.role.DefaultRoleManager</implementation>
+      <description>RoleProfileManager:</description>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.redback.role.merger.RoleModelMerger</role>
+          <role-hint>default</role-hint>
+          <field-name>modelMerger</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.redback.role.validator.RoleModelValidator</role>
+          <role-hint>default</role-hint>
+          <field-name>modelValidator</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.redback.role.processor.RoleModelProcessor</role>
+          <role-hint>default</role-hint>
+          <field-name>modelProcessor</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.redback.role.template.RoleTemplateProcessor</role>
+          <role-hint>default</role-hint>
+          <field-name>templateProcessor</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+          <field-name>rbacManager</field-name>
+        </requirement>
+      </requirements>
+    </component>
+   <component>
+      <role>org.codehaus.plexus.redback.role.processor.RoleModelProcessor</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.redback.role.processor.DefaultRoleModelProcessor</implementation>
+      <description>DefaultRoleModelProcessor: inserts the components of the model that can be populated into the rbac manager</description>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+          <field-name>rbacManager</field-name>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.redback.role.template.RoleTemplateProcessor</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.redback.role.template.DefaultRoleTemplateProcessor</implementation>
+      <description>DefaultRoleTemplateProcessor: inserts the components of a template into the rbac manager</description>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.redback.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+          <field-name>rbacManager</field-name>
+        </requirement>
+      </requirements>
+    </component>
+  </components>
+</component-set>
index 582eac1c6afe3b682d2e4ca60faec16bc3ac2a42..7215c0c08f49b0406085943a7218db0ba9e31a7f 100644 (file)
@@ -16,7 +16,7 @@
   ~ KIND, either express or implied.  See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
-  -->
+  --> 
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     </dependency>
     <!-- Plexus Security Dependencies -->
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-ui-web</artifactId>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-xwork-content</artifactId>
       <type>war</type>
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.security</groupId>
-      <artifactId>plexus-security-ui-web-taglib</artifactId>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-xwork-integration</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.redback</groupId>
+      <artifactId>redback-taglib</artifactId>
     </dependency>
     <!-- Other dependencies -->
     <dependency>
               <includes>
                 <!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin -->
                 <include>META-INF</include>
-                <include>images/pss</include>
+                <include>images/redback</include>
                 <!-- Images from other wars -->
-                <include>template/pss</include>
+                <include>template/redback</include>
                 <!-- Templates from other wars -->
                 <include>WEB-INF/classes</include>
                 <!-- Classes and Resources from other wars -->
                 <!-- Database location configured in application.xml -->
                 <include>WEB-INF/logs</include>
                 <!-- Log file location specified in application.xml -->
-                <include>pss</include>
+                <include>redback</include>
                 <!-- plexus-security css and javascript -->
-                <include>css/pss</include>
-                <include>WEB-INF/jsp/pss</include>
+                <include>css/redback</include>
+                <include>WEB-INF/jsp/redback</include>
                 <!-- plexus-security jsps -->
-                <include>WEB-INF/template/pss</include>
+                <include>WEB-INF/template/redback</include>
                 <!-- plexus-security xwork templates -->
                 <include>WEB-INF/logs</include>
                 <!-- Directory created by jetty:run -->
index 59d1ab35b2ecfb87f5e20972d3562a2f057fbcaa..6c5fd527661f643da9eb21c1cb00754a421abc14 100644 (file)
@@ -21,10 +21,10 @@ package org.apache.maven.archiva.web.action;
 
 import org.apache.maven.archiva.reporting.ReportingManager;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.ArrayList;
index c5cac433722203defc3066f6176ea527f803fe04..3aaff4fad570d5a001c0a990422d7d601f5be09d 100644 (file)
@@ -29,12 +29,12 @@ import org.apache.maven.archiva.configuration.InvalidConfigurationException;
 import org.apache.maven.archiva.indexer.RepositoryIndexException;
 import org.apache.maven.archiva.indexer.RepositoryIndexSearchException;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
 import org.codehaus.plexus.scheduler.CronExpressionValidator;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.io.IOException;
index 2dbf69bb4eed8fb4e8b59daa9238b4717fbfc01e..ffdbeb6eb42b515b720968414eb9c6cab6bdd5e1 100644 (file)
@@ -25,10 +25,10 @@ import org.apache.maven.archiva.scheduled.DefaultArchivaTaskScheduler;
 import org.apache.maven.archiva.scheduled.tasks.ArchivaTask;
 import org.apache.maven.archiva.scheduled.tasks.RepositoryTask;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
index 8fc2caed5b88388dd796b37b57ff89805caf82c6..093bc6fafe22c34c7ffac057b167fd05cd1a7bcc 100644 (file)
@@ -29,11 +29,11 @@ import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.shared.app.company.CompanyPomHandler;
 import org.apache.maven.shared.app.configuration.Configuration;
 import org.apache.maven.shared.app.configuration.MavenAppConfiguration;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 
 import java.io.IOException;
 
index 5818a6f83ae27c63ee03ebb17437d9b91079e720..874eded6e53eb6eb38bca8b542f71a35ed18459a 100644 (file)
@@ -31,10 +31,10 @@ import org.apache.maven.shared.app.company.CompanyPomHandler;
 import org.apache.maven.shared.app.configuration.CompanyPom;
 import org.apache.maven.shared.app.configuration.Configuration;
 import org.apache.maven.shared.app.configuration.MavenAppConfiguration;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 
 import java.io.IOException;
 
index de24dea1fb7437078fea123b8767c25d287b25ec..9375b0859380357dc369c56fdd6d55a7c9df6e0d 100644 (file)
@@ -39,11 +39,11 @@ import org.apache.maven.archiva.policies.DownloadPolicy;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.io.IOException;
index 65c28c1456b508488084b32e6150eda60c2394db..7bc9d7e37fdc9495a7f2ec2ee5e55e73d93ba51d 100644 (file)
@@ -30,10 +30,10 @@ import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
 import org.apache.maven.archiva.configuration.RepositoryConfiguration;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.apache.maven.archiva.web.action.admin.repositories.AdminRepositoryConfiguration;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.ArrayList;
index 815eae3ed2a008844ac758c7c1aba693ce049df1..7c1b2a99ddb9757cb767b1db5f41f4d3d607562d 100644 (file)
@@ -28,10 +28,10 @@ import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration;
 import org.apache.maven.archiva.database.updater.DatabaseConsumers;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.apache.maven.archiva.web.action.admin.scanning.AdminRepositoryConsumerComparator;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.Collections;
index 1068bb21d3c9e1d41150599161f69429f0e0cdaa..79d35b593af7972dfef61722054c7b5908e51d37 100644 (file)
@@ -29,11 +29,11 @@ import org.apache.maven.archiva.configuration.Configuration;
 import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
 import org.apache.maven.archiva.configuration.functors.NetworkProxySelectionPredicate;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 /**
index 84d8974a0dc58b1d688f8ba9ec31421d280a6e0f..0869aa634a285fd2395a17d1cfbec17853be956f 100644 (file)
@@ -23,10 +23,10 @@ import com.opensymphony.xwork.Preparable;
 
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.List;
index f17c8c0990bed731a7f31b613b4d79c5b8700e7b..6af1946970fd025e9afdc9a88bc0fbd1d5348a18 100644 (file)
@@ -29,18 +29,17 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.InvalidConfigurationException;
 import org.apache.maven.archiva.configuration.RepositoryConfiguration;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-import org.codehaus.plexus.rbac.profile.RoleProfileManager;
+import org.codehaus.plexus.redback.authorization.AuthorizationException;
+import org.codehaus.plexus.redback.authorization.AuthorizationResult;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.role.RoleManager;
+import org.codehaus.plexus.redback.role.RoleManagerException;
+import org.codehaus.plexus.redback.system.SecuritySession;
+import org.codehaus.plexus.redback.system.SecuritySystem;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
-import org.codehaus.plexus.security.authorization.AuthorizationException;
-import org.codehaus.plexus.security.authorization.AuthorizationResult;
-import org.codehaus.plexus.security.rbac.RbacManagerException;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.system.SecuritySession;
-import org.codehaus.plexus.security.system.SecuritySystem;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.io.File;
@@ -56,9 +55,9 @@ public class ConfigureRepositoryAction
     implements Preparable, SecureAction
 {
     /**
-     * @plexus.requirement role-hint="archiva"
+     * @plexus.requirement role-hint="default"
      */
-    private RoleProfileManager roleProfileManager;
+    private RoleManager roleManager;
 
     /**
      * @plexus.requirement
@@ -136,7 +135,7 @@ public class ConfigureRepositoryAction
             {
                 addActionError( "Unable to delete repository: " + e.getMessage() );
             }
-            catch ( RoleProfileException e )
+            catch ( RoleManagerException e )
             {
                 addActionError( "Unable to delete repository: " + e.getMessage() );
             }
@@ -144,10 +143,6 @@ public class ConfigureRepositoryAction
             {
                 addActionError( "Unable to delete repository: " + e.getMessage() );
             }
-            catch ( RbacManagerException e )
-            {
-                addActionError( "Unable to delete repository: " + e.getMessage() );
-            }
             catch ( RegistryException e )
             {
                 addActionError( "Unable to delete repository: " + e.getMessage() );
@@ -240,18 +235,14 @@ public class ConfigureRepositoryAction
         {
             addActionError( "I/O Exception: " + e.getMessage() );
         }
-        catch ( RoleProfileException e )
+        catch ( RoleManagerException e )
         {
-            addActionError( "Role Profile Exception: " + e.getMessage() );
+            addActionError( "Role Manager Exception: " + e.getMessage() );
         }
         catch ( InvalidConfigurationException e )
         {
             addActionError( "Invalid Configuration Exception: " + e.getMessage() );
         }
-        catch ( RbacManagerException e )
-        {
-            addActionError( "RBAC Manager Exception: " + e.getMessage() );
-        }
         catch ( RegistryException e )
         {
             addActionError( "Configuration Registry Exception: " + e.getMessage() );
@@ -276,7 +267,7 @@ public class ConfigureRepositoryAction
     }
 
     private void addRepository( AdminRepositoryConfiguration repository )
-        throws IOException, RoleProfileException
+        throws IOException, RoleManagerException
     {
         getLogger().info( ".addRepository(" + repository + ")" );
 
@@ -299,9 +290,10 @@ public class ConfigureRepositoryAction
         archivaConfiguration.getConfiguration().addRepository( repository );
 
         // TODO: double check these are configured on start up
-        roleProfileManager.getDynamicRole( "archiva-repository-manager", repository.getId() );
+        roleManager.createTemplatedRole( "archiva-repository-manager", repository.getId() );
+
+        roleManager.createTemplatedRole( "archiva-repository-observer", repository.getId() );
 
-        roleProfileManager.getDynamicRole( "archiva-repository-observer", repository.getId() );
     }
 
     private boolean operationAllowed( String permission, String repoid )
@@ -347,17 +339,16 @@ public class ConfigureRepositoryAction
     }
 
     private void removeRepositoryRoles( RepositoryConfiguration existingRepository )
-        throws RoleProfileException
+        throws RoleManagerException
     {
-        roleProfileManager.deleteDynamicRole( "archiva-repository-manager", existingRepository.getId() );
-        roleProfileManager.deleteDynamicRole( "archiva-repository-observer", existingRepository.getId() );
+        roleManager.removeTemplatedRole( "archiva-repository-manager", existingRepository.getId() );
+        roleManager.removeTemplatedRole( "archiva-repository-observer", existingRepository.getId() );
 
         getLogger().info( "removed user roles associated with repository " + existingRepository.getId() );
     }
 
     private String saveConfiguration()
-        throws IOException, InvalidConfigurationException, RbacManagerException, RoleProfileException,
-        RegistryException
+        throws IOException, InvalidConfigurationException, RegistryException
     {
         getLogger().info( ".saveConfiguration()" );
 
index 57a4bf3142849a5e97e2521fbd84d56dbf58c1e9..8559d48e6005ac2c7ebd6bf8776bc51d92509adb 100644 (file)
@@ -32,10 +32,10 @@ import org.apache.maven.archiva.configuration.functors.RemoteRepositoryPredicate
 import org.apache.maven.archiva.configuration.functors.RepositoryConfigurationComparator;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
 import org.apache.maven.archiva.web.util.ContextUtils;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.ArrayList;
index 701409cc86f169db07fded7c24dabe10eebd0cd3..2ea6bf601b967f3e794f6db5c93bdfc809a3d3f8 100644 (file)
@@ -32,11 +32,11 @@ import org.apache.maven.archiva.configuration.functors.FiletypeSelectionPredicat
 import org.apache.maven.archiva.configuration.functors.FiletypeToMapClosure;
 import org.apache.maven.archiva.repository.scanner.RepositoryContentConsumers;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.redback.rbac.Resource;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureAction;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionBundle;
+import org.codehaus.plexus.redback.xwork.interceptor.SecureActionException;
 import org.codehaus.plexus.registry.RegistryException;
-import org.codehaus.plexus.security.rbac.Resource;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
-import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import java.util.ArrayList;
index 5cbeb04633cd6a0bb7b089c1bb17a0c175646467..8802386cbc6d9630e1c9cdf526c740c2003a5f9e 100644 (file)
@@ -25,9 +25,9 @@ import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.ObjectNotFoundException;
 import org.apache.maven.archiva.model.ArchivaRepository;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.rbac.profile.RoleProfileException;
-import org.codehaus.plexus.rbac.profile.RoleProfileManager;
-import org.codehaus.plexus.security.system.check.EnvironmentCheck;
+import org.codehaus.plexus.redback.role.RoleManager;
+import org.codehaus.plexus.redback.role.RoleManagerException;
+import org.codehaus.plexus.redback.system.check.EnvironmentCheck;
 
 import java.util.Iterator;
 import java.util.List;
@@ -54,9 +54,9 @@ public class RoleExistanceEnvironmentCheck
     private ArchivaDAO dao;
 
     /**
-     * @plexus.requirement role-hint="archiva"
+     * @plexus.requirement role-hint="default"
      */
-    private RoleProfileManager roleProfileManager;
+    private RoleManager roleManager;
 
     private boolean checked;
 
@@ -75,13 +75,19 @@ public class RoleExistanceEnvironmentCheck
                     {
                         ArchivaRepository repository = (ArchivaRepository) it.next();
 
-                        roleProfileManager.getDynamicRole( "archiva-repository-manager", repository.getId() );
+                        if ( !roleManager.templatedRoleExists( "archiva-repository-manager", repository.getId() ) )
+                        {
+                            roleManager.createTemplatedRole( "archiva-repository-manager", repository.getId() );
+                        }
 
-                        roleProfileManager.getDynamicRole( "archiva-repository-observer", repository.getId() );
+                        if ( !roleManager.templatedRoleExists( "archiva-repository-observer", repository.getId() ) )
+                        {
+                            roleManager.createTemplatedRole( "archiva-repository-observer", repository.getId() );
+                        }
                     }
                 }
             }
-            catch ( RoleProfileException rpe )
+            catch ( RoleManagerException rpe )
             {
                 list.add( this.getClass().getName() + "error initializing roles: " + rpe.getMessage() );
                 getLogger().info( "error initializing roles", rpe );
index 4f43f76e6d48a31a4f03ad51199f6df62128d36b..8feaadc3b09e078a9bee4938b7aa0c2919d96cf8 100644 (file)
@@ -26,17 +26,17 @@ import org.apache.maven.archiva.database.ArchivaDatabaseException;
 import org.apache.maven.archiva.database.ObjectNotFoundException;
 import org.apache.maven.archiva.model.ArchivaRepository;
 import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.redback.authentication.AuthenticationException;
+import org.codehaus.plexus.redback.authentication.AuthenticationResult;
+import org.codehaus.plexus.redback.authorization.AuthorizationException;
+import org.codehaus.plexus.redback.authorization.AuthorizationResult;
+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.SecuritySystem;
+import org.codehaus.plexus.redback.xwork.filter.authentication.HttpAuthenticator;
 import org.codehaus.plexus.registry.Registry;
 import org.codehaus.plexus.registry.RegistryListener;
-import org.codehaus.plexus.security.authentication.AuthenticationException;
-import org.codehaus.plexus.security.authentication.AuthenticationResult;
-import org.codehaus.plexus.security.authorization.AuthorizationException;
-import org.codehaus.plexus.security.authorization.AuthorizationResult;
-import org.codehaus.plexus.security.policy.AccountLockedException;
-import org.codehaus.plexus.security.policy.MustChangePasswordException;
-import org.codehaus.plexus.security.system.SecuritySession;
-import org.codehaus.plexus.security.system.SecuritySystem;
-import org.codehaus.plexus.security.ui.web.filter.authentication.HttpAuthenticator;
 import org.codehaus.plexus.webdav.DavServerComponent;
 import org.codehaus.plexus.webdav.DavServerException;
 import org.codehaus.plexus.webdav.servlet.DavServerRequest;
index b726ec3b96ccbc75e94b78cdd0da2d95e167ad3a..aa45634ec08e9eb80ccf93f96d0f903df385e184 100644 (file)
     <interceptors>
       <interceptor name="strange" class="webwork-is-doing-strange-things"/>
       <interceptor name="configuration" class="configurationInterceptor"/>
-      <interceptor name="pssForceAdminUser" class="pssForceAdminUserInterceptor"/>
-      <interceptor name="pssSecureActions" class="pssSecureActionInterceptor"/>
-      <interceptor name="pssAutoLogin" class="pssAutoLoginInterceptor"/>
-      <interceptor name="pssPolicyEnforcement" class="pssPolicyEnforcementInterceptor"/>
+      <interceptor name="redbackForceAdminUser" class="redbackForceAdminUserInterceptor"/>
+      <interceptor name="redbackSecureActions" class="redbackSecureActionInterceptor"/>
+      <interceptor name="redbackAutoLogin" class="redbackAutoLoginInterceptor"/>
+      <interceptor name="redbackPolicyEnforcement" class="redbackPolicyEnforcementInterceptor"/>
       <interceptor name="paramFilter" class="com.opensymphony.xwork.interceptor.ParameterFilterInterceptor" />
       
       <interceptor-stack name="configuredArchivaStack">
-        <interceptor-ref name="pssForceAdminUser"/>
-        <interceptor-ref name="pssAutoLogin"/>
+        <interceptor-ref name="redbackForceAdminUser"/>
+        <interceptor-ref name="redbackAutoLogin"/>
         <interceptor-ref name="defaultStack"/>
         <interceptor-ref name="paramFilter">
           <param name="blocked">externalResult</param>
         </interceptor-ref>
-        <interceptor-ref name="pssSecureActions"/>
-        <interceptor-ref name="pssPolicyEnforcement"/>
+        <interceptor-ref name="redbackSecureActions"/>
+        <interceptor-ref name="redbackPolicyEnforcement"/>
         <interceptor-ref name="configuration"/>
         <interceptor-ref name="validation">
           <param name="excludeMethods">input,back,cancel,browse</param>
       </interceptor-stack>
 
       <interceptor-stack name="unconfiguredArchivaStack">
-        <interceptor-ref name="pssForceAdminUser"/>
-        <interceptor-ref name="pssAutoLogin"/>
+        <interceptor-ref name="redbackForceAdminUser"/>
+        <interceptor-ref name="redbackAutoLogin"/>
         <interceptor-ref name="defaultStack"/>
-        <interceptor-ref name="pssPolicyEnforcement"/>
-        <interceptor-ref name="pssSecureActions"/>
+        <interceptor-ref name="redbackPolicyEnforcement"/>
+        <interceptor-ref name="redbackSecureActions"/>
         <interceptor-ref name="validation">
           <param name="excludeMethods">input,back,cancel,browse</param>
         </interceptor-ref>
     <!-- This is the redirection facility for plexus-security,
          allowing plexus-security to call out from its own set of actions
          into the application webapp, using global result names. -->
-    <action name="pssRedirect" class="pss-redirect" method="redirect">
+    <action name="redbackRedirect" class="redback-redirect" method="redirect">
       <result type="redirect-action">browse</result>
     </action>
 
index 711817aedfe86f80b77e5839d4e6da4c72e552c6..04a7e2ba004e6f255899f281289965e381fdee4a 100644 (file)
@@ -20,7 +20,7 @@
 <%@ taglib prefix="ww" uri="/webwork"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem"%>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva"%>
 
 <html>
index b722d305a24c256791270ab417bb05b4309b8419..7e52ac9dbedbd884a46776f31f4bf538a4677c9f 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 
 <html>
 <head>
@@ -35,9 +35,9 @@
   <div>
     <div style="float: right">
       <%-- TODO replace with icons --%>
-      <pss:ifAuthorized permission="archiva-manage-configuration">
+      <redback:ifAuthorized permission="archiva-manage-configuration">
         <a href="<ww:url action="configure" />">Edit Configuration</a>
-      </pss:ifAuthorized>
+      </redback:ifAuthorized>
     </div>
     <h2>Configuration</h2>
   </div>
@@ -69,9 +69,9 @@
   <table class="infoTable">
     <tr>
       <td>
-        <pss:ifAuthorized permission="archiva-run-indexer">
+        <redback:ifAuthorized permission="archiva-run-indexer">
           <a href="<ww:url action="runIndexer" />">Run Now</a>
-        </pss:ifAuthorized>
+        </redback:ifAuthorized>
       </td>
     </tr>
   </table>
index 96b59b3737a0e1041f5b73e1c3aa9d6ee2cc2d6c..a81deecf5de34bef89df3e12af64bde53e870247 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ taglib prefix="ww" uri="/webwork"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem"%>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva"%>
 
 <html>
 
 <div class="admin">
 <div class="controls">
-<pss:ifAuthorized
+<redback:ifAuthorized
   permission="archiva-manage-configuration">
   <ww:url id="addNetworkProxyUrl" action="addNetworkProxy" />
   <ww:a href="%{addNetworkProxyUrl}">
     <img src="<c:url value="/images/icons/create.png" />" />
         Add Network Proxy</ww:a>
-</pss:ifAuthorized></div>
+</redback:ifAuthorized></div>
 <h2>Network Proxies</h2>
 
 <c:choose>
@@ -68,7 +68,7 @@
       <div class="netproxy ${rowColor}">
 
       <div class="controls">
-      <pss:ifAnyAuthorized
+      <redback:ifAnyAuthorized
         permissions="archiva-manage-configuration">
         <ww:url id="editNetworkProxyUrl" action="editNetworkProxy">
           <ww:param name="proxyid" value="%{'${proxy.id}'}" />
@@ -82,7 +82,7 @@
         <ww:a href="%{deleteNetworkProxyUrl}">
           <img src="<c:url value="/images/icons/delete.gif" />" />
             Delete Network Proxy</ww:a>
-      </pss:ifAnyAuthorized></div>
+      </redback:ifAnyAuthorized></div>
 
       <table class="infoTable">
         <tr>
index a7aad790e2c65bc63be1e218a74ade64d75cb49d..1e98a81e40ab1bacf87541c303df36dc4bf231b7 100644 (file)
@@ -20,7 +20,7 @@
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva" %>
 
 <html>
   <ww:actionmessage />
   
   <div style="float:right">
-    <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
+    <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
       <ww:url id="addProxyConnectorUrl" action="addProxyConnector" />
       <ww:a href="%{addProxyConnectorUrl}" cssClass="create">
         <img src="<c:url value="/images/icons/create.png" />" />
         Add Proxy Connector
       </ww:a>
-    </pss:ifAnyAuthorized>
+    </redback:ifAnyAuthorized>
   </div>
   
   <h2>Repository Proxy Connectors</h2>
@@ -72,7 +72,7 @@
             <td class="connector">
               <div class="wrap">
                 <div class="controls">
-                  <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
+                  <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
                     <ww:url id="editProxyConnectorUrl" action="editProxyConnector">
                       <ww:param name="target" value="%{'${connector.targetRepoId}'}" />
                       <ww:param name="source" value="%{'${connector.sourceRepoId}'}" />
@@ -87,7 +87,7 @@
                     <ww:a href="%{deleteProxyConnectorUrl}" cssClass="delete" title="Delete Proxy Connector">
                       <img src="<c:url value="/images/icons/delete.gif" />" />
                     </ww:a>
-                  </pss:ifAnyAuthorized>
+                  </redback:ifAnyAuthorized>
                 </div>
                 
                 <h4>Proxy Connector</h4>
index e977bc7d6cf45024781d8199043d1e927df7e3da..8d98808d48f1122cd9e43c87bca54ef1318b4bf5 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva" %>
 
 <html>
 
 <div class="admin">
   <div class="controls">
-    <pss:ifAuthorized permission="archiva-manage-configuration">
+    <redback:ifAuthorized permission="archiva-manage-configuration">
       <ww:url id="addRepositoryUrl" action="addRepository"/>
       <ww:a href="%{addRepositoryUrl}">
       <img src="<c:url value="/images/icons/create.png" />" />
       Add Repository</ww:a>
-    </pss:ifAuthorized>
+    </redback:ifAuthorized>
   </div>
   <h2>Local Repositories</h2>
 
@@ -70,7 +70,7 @@
 
         <div class="controls">
           <%-- TODO: make some icons --%>
-          <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
+          <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
             <ww:url id="editRepositoryUrl" action="editRepository">
               <ww:param name="repoid" value="%{'${repository.id}'}" />
             </ww:url>
@@ -83,7 +83,7 @@
             <ww:a href="%{deleteRepositoryUrl}">
             <img src="<c:url value="/images/icons/delete.gif" />" />
             Delete Repository</ww:a>
-          </pss:ifAnyAuthorized>
+          </redback:ifAnyAuthorized>
         </div>
         
         <div style="float: left">
               <th>Stats</th>
               <td>
                 <div style="float: right">
-                  <pss:ifAuthorized permission="archiva-run-indexer">
+                  <redback:ifAuthorized permission="archiva-run-indexer">
                     <ww:url id="indexRepositoryUrl" action="indexRepository">
                       <ww:param name="repoid" value="%{'${repository.id}'}" />
                     </ww:url>
                     <ww:a href="%{indexRepositoryUrl}">Index Repository</ww:a>
-                  </pss:ifAuthorized>
+                  </redback:ifAuthorized>
                 </div>
                 <c:choose>
                   <c:when test="${empty(repository.stats)}">
 
         <div class="controls">
           <%-- TODO: make some icons --%>
-          <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
+          <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
             <ww:url id="editRepositoryUrl" action="editRepository">
               <ww:param name="repoid" value="%{'${repository.id}'}" />
             </ww:url>
             <ww:a href="%{deleteRepositoryUrl}">
             <img src="<c:url value="/images/icons/delete.gif" />" />
             Delete Repository</ww:a>
-          </pss:ifAnyAuthorized>
+          </redback:ifAnyAuthorized>
         </div>
         
         <div style="float: left">
index 7db51246d5668b2275c130edc5bc267e2fa4572e..16fd98470ac68cc2b3420c65c7c95bc180ae44ef 100644 (file)
@@ -20,7 +20,7 @@
 <%@ taglib prefix="ww" uri="/webwork"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem"%>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva"%>
 
 <html>
index 58cf059abb5e9e8faaeaa98b4915cf4cc5b9acd6..21ac1aad68fe64dab46db398999001ef20802a99 100644 (file)
@@ -19,7 +19,7 @@
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 
 <html>
 <head>
index a932af783aa80ea4a7c054addb8378b9f745e631..541c0f00adb0748ba1367b74866c117cc0e85907 100644 (file)
@@ -23,7 +23,7 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 <%@ page import="java.util.Calendar" %>
 <html>
 <head>
@@ -33,7 +33,7 @@
 
   <link rel="stylesheet" href="<c:url value="/css/maven-base.css"/>" type="text/css" media="all"/>
   <link rel="stylesheet" href="<c:url value="/css/maven-theme.css"/>" type="text/css" media="all"/>
-  <link rel="stylesheet" href="<c:url value="/css/pss/table.css"/>" type="text/css" media="all"/>
+  <link rel="stylesheet" href="<c:url value="/css/redback/table.css"/>" type="text/css" media="all"/>
   <link rel="stylesheet" href="<c:url value="/css/site.css"/>" type="text/css" media="all"/>
   <link rel="stylesheet" href="<c:url value="/css/print.css"/>" type="text/css" media="print"/>
   <link rel="shortcut icon" href="<c:url value="/favicon.ico" />" />
@@ -60,7 +60,7 @@
 
 <div id="breadcrumbs">
   <div class="xleft">
-    <%@ include file="/WEB-INF/jsp/pss/include/securityLinks.jsp" %>
+    <%@ include file="/WEB-INF/jsp/redback/include/securityLinks.jsp" %>
   </div>
 
   <div class="xright">
       </li>
     </ul>
 
-    <pss:ifAnyAuthorized permissions="archiva-manage-users,archiva-access-reports,archiva-manage-configuration">
+    <redback:ifAnyAuthorized permissions="archiva-manage-users,archiva-access-reports,archiva-manage-configuration">
       <h5>Manage</h5>
       <ul>
-        <pss:ifAuthorized permission="archiva-access-reports">
+        <redback:ifAuthorized permission="archiva-access-reports">
           <li class="none">
             <my:currentWWUrl action="reports" namespace="/admin">Reports</my:currentWWUrl>
           </li>
-        </pss:ifAuthorized>
+        </redback:ifAuthorized>
           <%-- TODO
                 <li class="none">
                   <a href="#">Synchronisation</a>
                 </li>
           --%>
-        <pss:ifAuthorized permission="archiva-manage-users">
+        <redback:ifAuthorized permission="archiva-manage-users">
           <li class="none">
             <my:currentWWUrl action="userlist" namespace="/security">User Management</my:currentWWUrl>
           </li>
-        </pss:ifAuthorized>
-        <pss:ifAuthorized permission="archiva-manage-configuration">
+        </redback:ifAuthorized>
+        <redback:ifAuthorized permission="archiva-manage-configuration">
           <li class="none">
             <my:currentWWUrl action="configureAppearance" namespace="/admin">Appearance</my:currentWWUrl>
           </li>
-        </pss:ifAuthorized>
+        </redback:ifAuthorized>
         <%-- TODO: future options here.
              * Repository Statistics.
              * Web Services Statistics.
           --%>
       </ul>
-    </pss:ifAnyAuthorized>
+    </redback:ifAnyAuthorized>
 
-    <pss:ifAuthorized permission="archiva-manage-configuration">
+    <redback:ifAuthorized permission="archiva-manage-configuration">
       <h5>Administration</h5>
       <ul>
           <li class="none">
                * Web Services (enable / disable), role based?
             --%>
       </ul>
-    </pss:ifAuthorized>
+    </redback:ifAuthorized>
 
   </div>
 </div>
index 33d342ae069b4fea9038015e8b7dd3cc74981ec0..704266df2ed2e1a15ad5697d9f6dd3e45537474e 100644 (file)
@@ -21,7 +21,7 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
 
 <html>
index 0ba14bb8425f7953abe687450e70053d72da64b0..9090f754f65d4ad639b3f066045650d9e3adb2ed 100644 (file)
@@ -21,7 +21,7 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
 <%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva" %>
-<%@ taglib prefix="pss" uri="/plexusSecuritySystem" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0"  %>
 
 <html>
 <head>
         </ww:url>
       </c:set>
       <my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl>
-      <pss:ifAnyAuthorized permissions="archiva-access-reports">
+      <redback:ifAnyAuthorized permissions="archiva-access-reports">
         <c:set var="url">
              <ww:url action="showArtifactReports">
                <ww:param name="groupId" value="%{groupId}"/>
              </ww:url>
            </c:set>
            <my:currentWWUrl url="${url}">Reports</my:currentWWUrl>
-      </pss:ifAnyAuthorized>
+      </redback:ifAnyAuthorized>
       
     </span>
   </div>