continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r463402 [1/2] - in /maven/continuum/trunk: ./ continuum-core/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-core/src/main/resources/META-INF/plexus/ continuum-core/src/test/resources/org/apache/maven/continuum/ continuu...
Date Thu, 12 Oct 2006 20:01:48 GMT
Author: jmcconnell
Date: Thu Oct 12 13:01:45 2006
New Revision: 463402

URL: http://svn.apache.org/viewvc?view=rev&rev=463402
Log:
merging the integration-rbac branch to trunk as per the vote last week.

Added:
    maven/continuum/trunk/continuum-security/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/
    maven/continuum/trunk/continuum-security/src/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/
    maven/continuum/trunk/continuum-security/src/main/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/
    maven/continuum/trunk/continuum-security/src/main/java/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/
    maven/continuum/trunk/continuum-security/src/main/java/org/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/
    maven/continuum/trunk/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/
    maven/continuum/trunk/continuum-security/src/main/resources/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/
    maven/continuum/trunk/continuum-security/src/main/resources/META-INF/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/
    maven/continuum/trunk/continuum-security/src/main/resources/META-INF/plexus/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/main/resources/META-INF/plexus/
    maven/continuum/trunk/continuum-security/src/test/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/
    maven/continuum/trunk/continuum-security/src/test/java/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/
    maven/continuum/trunk/continuum-security/src/test/java/org/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/
    maven/continuum/trunk/continuum-security/src/test/java/org/apache/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/apache/
    maven/continuum/trunk/continuum-security/src/test/java/org/apache/maven/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/apache/maven/
    maven/continuum/trunk/continuum-security/src/test/java/org/apache/maven/continuum/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/apache/maven/continuum/
    maven/continuum/trunk/continuum-security/src/test/java/org/apache/maven/continuum/security/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/apache/maven/continuum/security/
    maven/continuum/trunk/continuum-security/src/test/java/org/apache/maven/continuum/security/profile/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-security/src/test/java/org/apache/maven/continuum/security/profile/
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/
      - copied from r463327, maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/
Removed:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SessionAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/UserInterceptor.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/login.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/redirectToContinuumInitialization.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/user.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroup.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/userGroups.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/users.jsp
Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
    maven/continuum/trunk/continuum-webapp/pom.xml
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction-configuration-validation.xml
    maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction.properties
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
    maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildNowCell.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/components/projectSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/configuration.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/configurationEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/groupSummary.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/DefaultTop.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/navigations/Menu.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupBuildDefinition.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupMembers.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/projectView.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp
    maven/continuum/trunk/pom.xml

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/pom.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Thu Oct 12 13:01:45 2006
@@ -160,6 +160,32 @@
       <groupId>org.apache.maven.continuum</groupId>
       <artifactId>continuum-release</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-security</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-rbac-profile</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-ui-web-integration</artifactId>
+      <scope>test</scope>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+     <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authorization-rbac-model</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+     <dependency>
+      <artifactId>plexus-security-authorization-rbac-store-memory</artifactId>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <version>1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <profiles>
     <profile>

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Thu Oct 12 13:01:45 2006
@@ -1033,6 +1033,8 @@
 
                 int projectGroupId = AbstractContinuumAction.getProjectGroupId( pgContext );
 
+
+
                 projectGroup = store.getProjectGroupWithProjects( projectGroupId );
             }
 
@@ -1084,6 +1086,9 @@
         {
             throw new ContinuumException( "Error adding projects from modules", e );
         }
+        context.put( AbstractContinuumAction.KEY_PROJECT_GROUP_ID, new Integer( projectGroup.getId() ) );
+        // add the relevent security administration roles for this project
+        executeAction( "add-assignable-roles", context );
 
         return result;
     }
@@ -2260,6 +2265,7 @@
         }
         catch ( ActionNotFoundException e )
         {
+            e.printStackTrace( );
             throw new ContinuumException( "Error while executing the action '" + actionName + "'.", e );
         }
         catch ( ContinuumException e )

Modified: maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-core/src/main/resources/META-INF/plexus/components.xml Thu Oct 12 13:01:45 2006
@@ -564,6 +564,20 @@
      -->
     <component>
       <role>org.codehaus.plexus.action.Action</role>
+      <role-hint>add-assignable-roles</role-hint>
+      <implementation>org.apache.maven.continuum.core.action.AddAssignableRolesAction</implementation>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.continuum.store.ContinuumStore</role>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.rbac.profile.RoleProfileManager</role>
+          <role-hint>continuum</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.action.Action</role>
       <role-hint>add-build-definition-to-project</role-hint>
       <implementation>org.apache.maven.continuum.core.action.AddBuildDefinitionToProjectAction</implementation>
       <requirements>

Modified: maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml (original)
+++ maven/continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml Thu Oct 12 13:01:45 2006
@@ -28,5 +28,126 @@
       </configuration>
     </component>
 
+    <!--
+     |
+     | dynamic role profiles for adding project group management and user roles, wired to memory RBACManager impls for
+     | test
+     |
+    -->
+    <component>
+      <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
+      <role-hint>continuum-group-developer</role-hint>
+      <implementation>org.apache.maven.continuum.security.profile.ProjectGroupDeveloperDynamicRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.rbac.profile.DynamicRoleProfile</role>
+      <role-hint>continuum-group-user</role-hint>
+      <implementation>org.apache.maven.continuum.security.profile.ProjectGroupUserDynamicRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+     <component>
+      <role>org.codehaus.plexus.rbac.profile.RoleProfile</role>
+      <role-hint>continuum-group-administrator</role-hint>
+      <implementation>org.apache.maven.continuum.security.profile.ContinuumGroupAdministratorRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</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>continuum-guest</role-hint>
+      <implementation>org.apache.maven.continuum.security.profile.ContinuumGuestRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</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>user-administrator</role-hint>
+      <implementation>org.codehaus.plexus.security.ui.web.role.profile.UserAdministratorRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</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>system-administrator</role-hint>
+      <implementation>org.codehaus.plexus.security.ui.web.role.profile.SystemAdministratorRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</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>registered-user</role-hint>
+      <implementation>org.codehaus.plexus.security.ui.web.role.profile.RegisteredUserRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</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>guest</role-hint>
+      <implementation>org.codehaus.plexus.security.ui.web.role.profile.GuestRoleProfile</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>memory</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.PlexusContainer</role>
+          <field-name>container</field-name>
+        </requirement>
+      </requirements>
+    </component>
   </components>
 </plexus>

Modified: maven/continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/pom.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/pom.xml (original)
+++ maven/continuum/trunk/continuum-webapp/pom.xml Thu Oct 12 13:01:45 2006
@@ -32,6 +32,57 @@
       </resource>
     </resources>
     <plugins>
+           <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-clean-plugin</artifactId>
+        <version>2.1.1-20060724.192148-1</version>
+        <!-- This configuration is added to cleanup from war:inplace -->
+        <configuration>
+          <filesets>
+            <fileset>
+              <directory>${basedir}/</directory>
+              <includes>
+                <include>derby.log</include>
+              </includes>
+            </fileset>
+            <fileset>
+              <directory>${basedir}/src/main/webapp</directory>
+              <includes>
+                <!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin -->
+                <include>META-INF</include>
+                <include>WEB-INF/classes</include>      <!-- Classes and Resources from other wars -->
+                <include>WEB-INF/lib</include>          <!-- Dependencies from other wars -->
+                <include>WEB-INF/database</include>     <!-- Database location configured in application.xml -->
+                <include>WEB-INF/logs</include>         <!-- Log file location specified in application.xml -->
+                <include>pss</include>                  <!-- plexus-security css and javascript -->
+                <include>WEB-INF/jsp/pss</include>      <!-- plexus-security jsps -->
+                <include>WEB-INF/template/pss</include> <!-- plexus-security xwork templates -->
+              </includes>
+            </fileset>
+          </filesets>
+        </configuration>
+      </plugin>
+            <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.0.1</version>
+        <configuration>
+          <!-- Some versions of maven-war-plugin (snapshots) have this incorrectly defaulted to true.
+               Specifically setting this to false to avoid accidental jar file creation. -->
+          <archiveClasses>false</archiveClasses>
+          <dependentWarExcludes>META-INF/**,WEB-INF/web.xml,WEB-INF/classes/xwork.xml</dependentWarExcludes>
+        </configuration>
+        <!-- TODO: would be good to make the jetty plugin aware of these and remove the below -->
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <!-- Needed to get the plexus-security war overlay to do its thing before jetty:run -->
+              <goal>inplace</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-maven-plugin</artifactId>
@@ -128,22 +179,6 @@
           </excludes>
         </configuration>
       </plugin>
-      <plugin>
-        <artifactId>maven-clean-plugin</artifactId>
-        <configuration>
-          <filesets>
-            <fileset>
-              <directory>src/main/webapp/WEB-INF</directory>
-              <includes>
-                <include>database</include>
-                <include>temp</include>
-                <include>logs</include>
-                <include>working-directory</include>
-              </includes>
-            </fileset>
-          </filesets>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
   <dependencies>
@@ -151,6 +186,10 @@
       <groupId>org.apache.maven.continuum</groupId>
       <artifactId>continuum-core</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.continuum</groupId>
+      <artifactId>continuum-security</artifactId>
+    </dependency>
     <dependency> <!-- added since depMgt doesn't override imported dependencies -->
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
@@ -283,6 +322,112 @@
       <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh</artifactId>
       <scope>runtime</scope>
+    </dependency>
+    <!--
+      Plexus Security Dependencies
+      -->
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-system</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-ui-web</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <type>war</type>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-ui-web-integration</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-ui-web-taglib</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-ui-web-rbac</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authentication-provider-user-manager</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-user-management-api</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-user-management-provider-jdo</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authorization-rbac-store-jdo</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-keys-jdo</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+     <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authentication-provider-keystore</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authorization-api</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus.security</groupId>
+      <artifactId>plexus-security-authorization-rbac-authorizer</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+        <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-jdo2</artifactId>
+      <version>1.0-alpha-7-SNAPSHOT</version>
+      <exclusions>
+        <exclusion>
+          <groupId>xerces</groupId>
+          <artifactId>xercesImpl</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>xerces</groupId>
+          <artifactId>xmlParserAPIs</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.1.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>jpox</groupId>
+      <artifactId>jpox</artifactId>
+      <version>1.1.1</version>
+      <exclusions>
+        <!-- targeting JDK 1.4 we don't need this -->
+        <exclusion>
+          <groupId>javax.sql</groupId>
+          <artifactId>jdbc-stdext</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
   </dependencies>
 </project>

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ConfigurationAction.java Thu Oct 12 13:01:45 2006
@@ -16,23 +16,23 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.util.Collections;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.maven.continuum.Continuum;
+import com.opensymphony.xwork.Preparable;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.configuration.ConfigurationStoringException;
-import org.apache.maven.continuum.model.system.ContinuumUser;
-import org.apache.maven.continuum.model.system.UserGroup;
-import org.apache.maven.continuum.security.ContinuumSecurity;
+import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.xwork.action.PlexusActionSupport;
+import org.codehaus.plexus.security.policy.UserSecurityPolicy;
+import org.codehaus.plexus.security.rbac.Resource;
+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.security.user.User;
+import org.codehaus.plexus.security.user.UserManager;
+import org.codehaus.plexus.security.user.UserNotFoundException;
 
-import com.opensymphony.webwork.ServletActionContext;
+import java.io.File;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -43,30 +43,22 @@
  *   role-hint="configuration"
  */
 public class ConfigurationAction
-    extends PlexusActionSupport
+    extends ContinuumActionSupport
+    implements Preparable, SecureAction
 {
+    
     /**
      * @plexus.requirement
      */
-    private Continuum continuum;
+    private ContinuumStore store;
 
     /**
      * @plexus.requirement
      */
-    private ContinuumStore store;
+    private SecuritySystem securitySystem;
 
     private boolean guestAccountEnabled;
 
-    private String username;
-
-    private String password;
-
-    private String passwordTwo;
-
-    private String fullName;
-
-    private String email;
-
     private String workingDirectory;
 
     private String buildOutputDirectory;
@@ -81,37 +73,44 @@
 
     private String companyUrl;
 
-    public String save()
-        throws ConfigurationStoringException, ContinuumStoreException
+
+    public void prepare()
     {
-        //todo switch this to validation
+        try{
+
+
+        ConfigurationService configuration = getContinuum().getConfiguration();
+
+        guestAccountEnabled = getGuestAccountLockingStatus();
+
+        workingDirectory = configuration.getWorkingDirectory().getAbsolutePath();
 
-        ContinuumUser adminUser = new ContinuumUser();
+        buildOutputDirectory = configuration.getBuildOutputDirectory().getAbsolutePath();
 
-        adminUser.setUsername( username );
-        adminUser.setPassword( password );
-        adminUser.setEmail( email );
-        adminUser.setFullName( fullName );
-        adminUser.setGroup( store.getUserGroup( ContinuumSecurity.ADMIN_GROUP_NAME ) );
+        baseUrl = configuration.getUrl();
 
-        store.addUser( adminUser );
+        companyLogo = configuration.getCompanyLogo();
 
-        ConfigurationService configuration = continuum.getConfiguration();
+        companyName = configuration.getCompanyName();
 
-        if ( guestAccountEnabled )
+        companyUrl = configuration.getCompanyUrl();
+        } catch ( Exception e)
         {
-            configuration.setGuestAccountEnabled( guestAccountEnabled );
+            e.printStackTrace( );
         }
-        else
-        {
-            configuration.setGuestAccountEnabled( false );
+    }
+
+    public String save()
+        throws ConfigurationStoringException, ContinuumStoreException
+    {
 
-            UserGroup guestGroup = store.getUserGroup( ContinuumSecurity.GUEST_GROUP_NAME );
+        try
+        {
+        ConfigurationService configuration = getContinuum().getConfiguration();
 
-            guestGroup.setPermissions( Collections.EMPTY_LIST );
+        configuration.setGuestAccountEnabled( guestAccountEnabled );
 
-            store.updateUserGroup( guestGroup );
-        }
+        resolveGuestAccountLockingStatus();
 
         configuration.setWorkingDirectory( new File( workingDirectory ) );
 
@@ -129,103 +128,82 @@
 
         configuration.setInitialized( true );
         configuration.store();
-
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace( );
+        }
         return SUCCESS;
-    }
 
-    public String edit()
-        throws Exception
-    {
-        setConfiguration();
-        return SUCCESS;
     }
 
-    private void setConfiguration()
-    {
-        ConfigurationService configuration = continuum.getConfiguration();
-
-        guestAccountEnabled = configuration.isGuestAccountEnabled();
 
-        workingDirectory = configuration.getWorkingDirectory().getAbsolutePath();
+    private void resolveGuestAccountLockingStatus()
+    {
 
-        buildOutputDirectory = configuration.getBuildOutputDirectory().getAbsolutePath();
+        UserManager userManager = securitySystem.getUserManager();
+        UserSecurityPolicy policy = securitySystem.getPolicy();
 
-        baseUrl = configuration.getUrl();
+        User guest;
 
-        if ( StringUtils.isEmpty( baseUrl ) )
+        try
         {
-            HttpServletRequest request = ServletActionContext.getRequest();
-            baseUrl = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
-                + request.getContextPath();
-            getLogger().info( "baseUrl='" + baseUrl + "'" );
+            guest = userManager.findUser( "guest" );
+            guest.setLocked( guestAccountEnabled );
+            userManager.updateUser( guest );
         }
+        catch ( UserNotFoundException ne )
+        {
+            policy.setEnabled( false );
 
-        companyLogo = configuration.getCompanyLogo();
-
-        companyName = configuration.getCompanyName();
-
-        companyUrl = configuration.getCompanyUrl();
-
-    }
-
-    public boolean isGuestAccountEnabled()
-    {
-        return guestAccountEnabled;
-    }
+            guest = userManager.createUser( "guest", "Guest", "" );
+            guest.setLocked( guestAccountEnabled );
+            guest = userManager.addUser( guest );
 
-    public void setGuestAccountEnabled( boolean guestAccountEnabled )
-    {
-        this.guestAccountEnabled = guestAccountEnabled;
-    }
-
-    public String getUsername()
-    {
-        return username;
+        }
+        finally
+        {
+            policy.setEnabled( true );
+        }       
     }
 
-    public void setUsername( String username )
+    private boolean getGuestAccountLockingStatus()
     {
-        this.username = username;
-    }
+        UserManager userManager = securitySystem.getUserManager();
+        UserSecurityPolicy policy = securitySystem.getPolicy();
 
-    public String getPassword()
-    {
-        return password;
-    }
+        User guest;
 
-    public void setPassword( String password )
-    {
-        this.password = password;
-    }
+        try
+        {
+            guest = userManager.findUser( "guest" );
 
-    public String getPasswordTwo()
-    {
-        return passwordTwo;
-    }
+            return guest.isLocked();
+        }
+        catch ( UserNotFoundException ne )
+        {
+            policy.setEnabled( false );
 
-    public void setPasswordTwo( String passwordTwo )
-    {
-        this.passwordTwo = passwordTwo;
-    }
+            guest = userManager.createUser( "guest", "Guest", "" );
+            guest = userManager.addUser( guest );
 
-    public String getFullName()
-    {
-        return fullName;
+            return guest.isLocked();
+        }
+        finally
+        {
+            policy.setEnabled( true );
+        }
     }
 
-    public void setFullName( String fullName )
-    {
-        this.fullName = fullName;
-    }
 
-    public String getEmail()
+    public boolean isGuestAccountEnabled()
     {
-        return email;
+        return guestAccountEnabled;
     }
 
-    public void setEmail( String email )
+    public void setGuestAccountEnabled( boolean guestAccountEnabled )
     {
-        this.email = email;
+        this.guestAccountEnabled = guestAccountEnabled;
     }
 
     public String getWorkingDirectory()
@@ -296,5 +274,16 @@
     public void setCompanyUrl( String companyUrl )
     {
         this.companyUrl = companyUrl;
+    }
+
+
+    public SecureActionBundle getSecureActionBundle()
+        throws SecureActionException
+    {
+        SecureActionBundle bundle = new SecureActionBundle();
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_CONFIGURATION, Resource.GLOBAL );
+
+        return bundle;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java Thu Oct 12 13:01:45 2006
@@ -18,7 +18,6 @@
  */
 
 import org.apache.maven.continuum.Continuum;
-import org.apache.maven.continuum.initialization.ContinuumInitializationException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
 import com.opensymphony.xwork.Preparable;
@@ -41,15 +40,7 @@
     public void prepare()
         throws Exception
     {
-        getLogger().debug( "Checking if Continuum is initialized" );
-
-        if ( !continuum.getConfiguration().isInitialized() )
-        {
-            throw new ContinuumInitializationException( "This is your first time running continuum, "
-                + "when you access it through a web browser you will need to enter some "
-                + "information before being able to use it. " + "You can ignore this exception." );
-        }
-
+ 
     }
 
     public Continuum getContinuum()

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java Thu Oct 12 13:01:45 2006
@@ -53,6 +53,7 @@
 public class GroupSummaryAction
     extends ContinuumActionSupport
 {
+    private String infoMessage;
 
     private List groups;
 
@@ -180,4 +181,14 @@
         return groups;
     }
 
+
+    public String getInfoMessage()
+    {
+        return infoMessage;
+    }
+
+    public void setInfoMessage( String infoMessage )
+    {
+        this.infoMessage = infoMessage;
+    }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java Thu Oct 12 13:01:45 2006
@@ -40,6 +40,8 @@
 {
     private int projectGroupId;
 
+    private String projectGroupName;
+
     private int nbSuccesses;
 
     private int nbFailures;
@@ -157,5 +159,16 @@
     public void setProjectGroupId( int projectGroupId )
     {
         this.projectGroupId = projectGroupId;
+    }
+
+
+    public String getProjectGroupName()
+    {
+        return projectGroupName;
+    }
+
+    public void setProjectGroupName( String projectGroupName )
+    {
+        this.projectGroupName = projectGroupName;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/component/BuildDefinitionSummaryAction.java Thu Oct 12 13:01:45 2006
@@ -40,6 +40,8 @@
 {
     private int projectGroupId;
 
+    private String projectGroupName;
+
     private int projectId;
     
     private ProjectGroup projectGroup;
@@ -169,6 +171,16 @@
     public void setProjectGroupId( int projectGroupId )
     {
         this.projectGroupId = projectGroupId;
+    }
+
+    public String getProjectGroupName()
+    {
+        return projectGroupName;
+    }
+
+    public void setProjectGroupName( String projectGroupName )
+    {
+        this.projectGroupName = projectGroupName;
     }
 
     public List getProjectBuildDefinitionSummaries()

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildCell.java Thu Oct 12 13:01:45 2006
@@ -17,7 +17,15 @@
  */
 
 import com.opensymphony.webwork.views.util.UrlHelper;
+import com.opensymphony.xwork.ActionContext;
 import org.apache.maven.continuum.web.model.ProjectSummary;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.security.authorization.AuthorizationException;
+import org.codehaus.plexus.security.system.SecuritySession;
+import org.codehaus.plexus.security.system.SecuritySystem;
+import org.codehaus.plexus.security.system.SecuritySystemConstants;
+import org.codehaus.plexus.xwork.PlexusLifecycleListener;
 import org.extremecomponents.table.bean.Column;
 import org.extremecomponents.table.cell.DisplayCell;
 import org.extremecomponents.table.core.TableModel;
@@ -42,13 +50,53 @@
     protected String getCellValue( TableModel tableModel, Column column )
     {
         ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
-
         String contextPath = tableModel.getContext().getContextPath();
 
         int buildNumber = project.getBuildNumber();
 
         String result = "<div align=\"center\">";
 
+
+        // do the authz bit
+        ActionContext context = ActionContext.getContext();
+
+        PlexusContainer container = (PlexusContainer) context.getApplication().get( PlexusLifecycleListener.KEY );
+        SecuritySession securitySession =
+            (SecuritySession) context.getSession().get( SecuritySystemConstants.SECURITY_SESSION_KEY );
+
+        try
+        {
+            SecuritySystem securitySystem = (SecuritySystem) container.lookup( SecuritySystem.ROLE );
+
+            if ( !securitySystem.isAuthorized( securitySession, "continuum-build-group",
+                                               project.getProjectGroupName() ) )
+            {
+                result += "<img src=\"" + contextPath +
+                    "/images/buildnow_disabled.gif\" alt=\"not authorized\" title=\"not authorized\" border=\"0\">";
+                result += "</div>";
+
+                return result;
+            }
+        }
+        catch ( ComponentLookupException cle )
+        {
+            result +=
+                "<img src=\"" + contextPath + "/images/buildnow_disabled.gif\" alt=\"cle\" title=\"cle\" border=\"0\">";
+            result += "</div>";
+
+            return result;
+        }
+        catch ( AuthorizationException ae )
+        {
+            result += "<img src=\"" + contextPath +
+                "/images/buildnow_disabled.gif\" alt=\"authz exception\" title=\"authz exception\" border=\"0\">";
+            result += "</div>";
+
+            return result;
+        }
+
+
+        // we are authzd so act normally
         if ( project.isInQueue() )
         {
             result += "<img src=\"" + contextPath + "/images/inqueue.gif\" alt=\"In Queue\" title=\"In Queue\" border=\"0\">";

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java Thu Oct 12 13:01:45 2006
@@ -21,6 +21,14 @@
 import org.extremecomponents.table.bean.Column;
 import org.extremecomponents.table.cell.DisplayCell;
 import org.extremecomponents.table.core.TableModel;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.security.system.SecuritySession;
+import org.codehaus.plexus.security.system.SecuritySystemConstants;
+import org.codehaus.plexus.security.system.SecuritySystem;
+import org.codehaus.plexus.security.authorization.AuthorizationException;
+import org.codehaus.plexus.xwork.PlexusLifecycleListener;
+import com.opensymphony.xwork.ActionContext;
 
 /**
  * Used in Summary view
@@ -39,6 +47,33 @@
         ProjectSummary project = (ProjectSummary) tableModel.getCurrentRowBean();
 
         String contextPath = tableModel.getContext().getContextPath();
+
+        // do the authz bit
+        ActionContext context = ActionContext.getContext();
+
+        PlexusContainer container = (PlexusContainer) context.getApplication().get( PlexusLifecycleListener.KEY );
+        SecuritySession securitySession =
+            (SecuritySession) context.getSession().get( SecuritySystemConstants.SECURITY_SESSION_KEY );
+
+        try
+        {
+            SecuritySystem securitySystem = (SecuritySystem) container.lookup( SecuritySystem.ROLE );
+
+            if ( !securitySystem.isAuthorized( securitySession, "continuum-build-group",
+                                               project.getProjectGroupName() ) )
+            {
+                return image( contextPath, "Not Authorized", "buildnow_disabled.gif" );
+            }
+        }
+        catch ( ComponentLookupException cle )
+        {
+            return image( contextPath, "Not Authorized[cle]", "buildnow_disabled.gif" );
+        }
+        catch ( AuthorizationException ae )
+        {
+            return image( contextPath, "Not Authorized[ae]", "buildnow_disabled.gif" );
+        }
+
 
         if ( project.isInQueue() )
         {

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Thu Oct 12 13:01:45 2006
@@ -240,18 +240,22 @@
       </configuration>
     </component>
 
-    <!-- TODO share db configuration between components -->
+
     <component>
       <role>org.codehaus.plexus.jdo.JdoFactory</role>
-      <role-hint>continuum</role-hint>
+
       <implementation>org.codehaus.plexus.jdo.DataSourceConfigurableJdoFactory</implementation>
+
+      <role-hint>continuum</role-hint>
+
       <configuration>
 
+
         <connectionFactoryName>java:comp/env/jdbc/continuum</connectionFactoryName>
         <shutdownConnectionFactoryName>java:comp/env/jdbc/continuum_shutdown</shutdownConnectionFactoryName>
 
-        <!-- JPOX and JDO configuration -->
         <persistenceManagerFactoryClass>org.jpox.PersistenceManagerFactoryImpl</persistenceManagerFactoryClass>
+
         <otherProperties>
           <property>
             <name>org.jpox.autoCreateSchema</name>
@@ -278,8 +282,8 @@
             <value>READ_UNCOMMITTED</value>
           </property>
           <property>
-            <name>org.jpox.poid.transactionIsolation</name>
-            <value>READ_UNCOMMITTED</value>
+            <name>org.jpox.validateTables</name>
+            <value>false</value>
           </property>
         </otherProperties>
       </configuration>
@@ -318,12 +322,12 @@
             <value>None</value>
           </property>
           <property>
-            <name>org.jpox.transactionIsolation</name>
+            <name>org.jpox.poid.transactionIsolation</name>
             <value>READ_UNCOMMITTED</value>
           </property>
           <property>
-            <name>org.jpox.poid.transactionIsolation</name>
-            <value>READ_UNCOMMITTED</value>
+            <name>org.jpox.rdbms.dateTimezone</name>
+            <value>JDK_DEFAULT_TIMEZONE</value>
           </property>
         </otherProperties>
       </configuration>
@@ -424,6 +428,232 @@
         </levels>
       </configuration>
     </component>
+
+
+    <!-- plexus security components -->
+            <component>
+      <role>org.codehaus.plexus.security.system.ApplicationDetails</role>
+      <implementation>org.codehaus.plexus.security.system.DefaultApplicationDetails</implementation>
+      <description>DefaultApplicationDetails</description>
+      <configuration>
+        <application-name>Unconfigured Application Name</application-name>
+        <!-- Do not include the trailing '/' on the url. -->
+        <application-url>http://localhost:9090</application-url>
+        <timestamp-format>EEE, d MMM yyyy HH:mm:ss Z</timestamp-format>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.system.EmailSettings</role>
+      <implementation>org.codehaus.plexus.security.system.DefaultEmailSettings</implementation>
+      <description>DefaultEmailSettings</description>
+      <configuration>
+        <feedback>/feedback.action</feedback>
+        <from-address>security@unconfigured.com</from-address>
+        <from-username>Unconfigured Username</from-username>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.system.SecuritySystem</role>
+      <implementation>org.codehaus.plexus.security.system.DefaultSecuritySystem</implementation>
+      <role-hint>default</role-hint>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.authentication.AuthenticationManager</role>
+          <role-hint>default</role-hint>
+          <field-name>authnManager</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.authorization.Authorizer</role>
+          <role-hint>rbac</role-hint>
+          <field-name>authorizer</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.user.UserManager</role>
+          <role-hint>jdo</role-hint>
+          <field-name>userManager</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.keys.KeyManager</role>
+          <role-hint>jdo</role-hint>
+          <field-name>keyManager</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.policy.UserSecurityPolicy</role>
+          <role-hint>default</role-hint>
+          <field-name>policy</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.system.ApplicationDetails</role>
+          <field-name>applicationDetails</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.system.EmailSettings</role>
+          <field-name>emailSettings</field-name>
+        </requirement>
+      </requirements>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.authorization.Authorizer</role>
+      <role-hint>rbac</role-hint>
+      <implementation>org.codehaus.plexus.security.authorization.rbac.RbacAuthorizer</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.rbac.RBACManager</role>
+          <role-hint>jdo</role-hint>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.user.UserManager</role>
+          <role-hint>jdo</role-hint>
+          <field-name>userManager</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.authorization.rbac.evaluator.PermissionEvaluator</role>
+          <role-hint>default</role-hint>
+        </requirement>
+      </requirements>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+      <role-hint>character-length</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.rules.CharacterLengthPasswordRule</implementation>
+      <description>Basic Password Rule, Checks for non-empty passwords that have between {@link #setMinimumCharacters(int)} and {@link #setMaximumCharacters(int)} characters in length.</description>
+      <configuration>
+        <enabled>true</enabled>
+        <minimum-characters>1</minimum-characters>
+        <maximum-characters>8</maximum-characters>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+      <role-hint>reuse</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.rules.ReusePasswordRule</implementation>
+      <description>Password Rule, Checks supplied password found at {@link User#getPassword()} against the {@link User#getPreviousEncodedPasswords()} to ensure that a password is not reused.</description>
+      <configuration>
+        <enabled>true</enabled>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+      <role-hint>numerical-count</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.rules.NumericalPasswordRule</implementation>
+      <description>Basic Password Rule, Checks for non-empty passwords that have at least {@link #setMinimumCount(int)} of numerical characters contained within.</description>
+      <configuration>
+        <enabled>true</enabled>
+        <minimum-count>1</minimum-count>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+      <role-hint>must-have</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.rules.MustHavePasswordRule</implementation>
+      <description>Basic Password Rule, Checks for non-empty Passwords in non guest users.</description>
+      <configuration>
+        <enabled>true</enabled>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+      <role-hint>alpha-count</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.rules.AlphaPasswordRule</implementation>
+      <description>Basic Password Rule, Checks for non-empty passwords that have at least {@link #setMinimumCount(int)} of alpha characters contained within.</description>
+      <configuration>
+        <enabled>true</enabled>
+        <minimum-count>1</minimum-count>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.UserSecurityPolicy</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.security.policy.DefaultUserSecurityPolicy</implementation>
+      <description>User Security Policy.</description>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.security.policy.PasswordEncoder</role>
+          <role-hint>sha256</role-hint>
+          <field-name>passwordEncoder</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.policy.UserValidationSettings</role>
+          <field-name>userValidationSettings</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.policy.PasswordRule</role>
+          <field-name>rules</field-name>
+        </requirement>
+         <requirement>
+          <role>org.codehaus.plexus.security.policy.RememberMeSettings</role>
+          <field-name>rememberMeSettings</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.security.policy.SingleSignOnSettings</role>
+          <field-name>singleSignOnSettings</field-name>
+        </requirement>
+      </requirements>
+      <configuration>
+        <previous-passwords-count>6</previous-passwords-count>
+        <login-attempt-count>3</login-attempt-count>
+        <password-expiration-days>90</password-expiration-days>
+      </configuration>
+    </component>
+
+    <component>
+         <role>org.codehaus.plexus.security.policy.RememberMeSettings</role>
+         <implementation>org.codehaus.plexus.security.policy.DefaultRememberMeSettings</implementation>
+         <description>DefaultRememberMeSettings</description>
+         <configuration>
+           <enabled>true</enabled>
+           <cookie-timeout>525600</cookie-timeout>
+         </configuration>
+       </component>
+
+       <component>
+         <role>org.codehaus.plexus.security.policy.SingleSignOnSettings</role>
+         <implementation>org.codehaus.plexus.security.policy.DefaultSingleSignOnSettings</implementation>
+         <description>DefaultSingleSignOnSettings</description>
+         <configuration>
+           <enabled>true</enabled>
+           <cookie-timeout>30</cookie-timeout>
+           <cookie-domain>localhost</cookie-domain>
+         </configuration>
+       </component>
+
+    <component>
+      <role>org.codehaus.plexus.security.policy.UserValidationSettings</role>
+      <implementation>org.codehaus.plexus.security.policy.DefaultUserValidationSettings</implementation>
+      <description>DefaultUserValidationSettings</description>
+      <configuration>
+        <email-validation-required>false</email-validation-required>
+        <!-- This is a timeout for the validation url (in minutes) - 2880 = 48 hours -->
+        <email-validation-timeout>2880</email-validation-timeout>
+        <email-login-path>/security/login!login.action</email-login-path>
+        <email-subject>Unconfigured Subject Line</email-subject>
+      </configuration>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.mailsender.MailSender</role>
+      <implementation>org.codehaus.plexus.mailsender.javamail.JavamailMailSender</implementation>
+      <configuration>
+        <smtp-host>localhost</smtp-host>
+        <smtp-port>25</smtp-port>
+        <sslProvider>com.sun.net.ssl.internal.ssl.Provider</sslProvider>
+        <!--
+        <username>mylogin</username>
+        <password>mypassword</password>
+        <sslMode>true</sslMode>
+        -->
+      </configuration>
+    </component>
+
   </components>
 
 </plexus>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction-configuration-validation.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction-configuration-validation.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction-configuration-validation.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction-configuration-validation.xml Thu Oct 12 13:01:45 2006
@@ -21,29 +21,4 @@
       <message key="configuration.baseUrl.invalid"/>
     </field-validator>
   </field>
-  <field name="username">
-    <field-validator type="requiredstring">
-      <message key="configuration.username.required"/>
-    </field-validator>
-  </field>
-  <field name="fullName">
-    <field-validator type="requiredstring">
-      <message key="configuration.fullName.required"/>
-    </field-validator>
-  </field>
-  <field name="password">
-    <field-validator type="requiredstring">
-      <message key="configuration.password.required"/>
-    </field-validator>
-  </field>
-  <field name="passwordTwo">
-    <field-validator type="requiredstring">
-      <message key="configuration.passwordTwo.required"/>
-    </field-validator>
-  </field>
-  <validator type="expression">
-    <param name="expression">
-      password.equals(passwordTwo)</param>
-    <message key="configuration.passwordTwo.nomatch"/>
-  </validator>
 </validators>

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction.properties?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction.properties (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/org/apache/maven/continuum/web/action/ConfigurationAction.properties Thu Oct 12 13:01:45 2006
@@ -2,8 +2,3 @@
 configuration.buildOutputDirectory.required = You must define a build output directory.
 configuration.baseUrl.required = You must define a URL.
 configuration.baseUrl.invalid = You must define a valid URL.
-configuration.username.required = Username is required
-configuration.fullName.required = Full name is required
-configuration.password.required = Password is required
-configuration.passwordTwo.required = Password must be verified again
-configuration.passwordTwo.nomatch = Password does not match

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Oct 12 13:01:45 2006
@@ -2,26 +2,44 @@
 
 <xwork>
   <include file="webwork-default.xml"/>
+
+  <!-- Include plexus-security xwork configurations. -->  
+  <include file="xwork-security.xml" />
+
+
   <package name="default" extends="webwork-default">
 
     <interceptors>
       <interceptor name="exception-logging" class="exceptionLogging"/>
-      <interceptor name="user" class="userInterceptor"/>
-      <interceptor-stack name="defaultContinuumStack">
-        <interceptor-ref name="user"/>
+      <interceptor name="continuumConfigurationCheck" class="forceContinuumConfigurationInterceptor"/>
+      <interceptor name="pssForceAdminUser" class="pssForceAdminUserInterceptor"/>
+      <interceptor name="pssSecureActions" class="pssSecureActionInterceptor"/>
+      <interceptor name="pssAutoLogin" class="pssAutoLoginInterceptor"/>
+      <interceptor name="pssEnvironmentChecker" class="pssEnvironmentCheckInterceptor"/>
+      
+      <interceptor-stack name="configuredContinuumStack">
+        <interceptor-ref name="defaultStack"/>
         <interceptor-ref name="exception-logging"/>
-        <!--<interceptor-ref name="defaultStack"/>-->
-
+        <interceptor-ref name="pssEnvironmentChecker"/>
+        <interceptor-ref name="pssForceAdminUser"/>
+        <interceptor-ref name="pssAutoLogin"/>
+        <interceptor-ref name="pssSecureActions"/>
+        <interceptor-ref name="continuumConfigurationCheck"/>
+        <interceptor-ref name="validation">
+          <param name="excludeMethods">input,back,cancel,browse,edit</param>
+        </interceptor-ref>
+        <interceptor-ref name="workflow">
+          <param name="excludeMethods">input,back,cancel,browse,edit</param>
+        </interceptor-ref>
+      </interceptor-stack>
 
-        <interceptor-ref name="prepare"/>
-        <interceptor-ref name="servlet-config"/>
-        <interceptor-ref name="chain"/>
-        <interceptor-ref name="model-driven"/>
-        <interceptor-ref name="component"/>
-        <interceptor-ref name="fileUpload"/>
-        <interceptor-ref name="static-params"/>
-        <interceptor-ref name="params"/>
-        <!-- interceptor-ref name="conversionError"/ -->
+      <interceptor-stack name="unconfiguredContinuumStack">
+        <interceptor-ref name="defaultStack"/>
+        <interceptor-ref name="exception-logging"/>
+        <interceptor-ref name="pssEnvironmentChecker"/>
+        <interceptor-ref name="pssForceAdminUser"/>
+        <interceptor-ref name="pssAutoLogin"/>
+        <interceptor-ref name="pssSecureActions"/>
         <interceptor-ref name="validation">
           <param name="excludeMethods">input,back,cancel,browse,edit</param>
         </interceptor-ref>
@@ -31,11 +49,54 @@
       </interceptor-stack>
     </interceptors>
 
-    <default-interceptor-ref name="defaultContinuumStack"/>
+    <default-interceptor-ref name="configuredContinuumStack"/>
 
     <global-results>
-      <result name="error-internal">/error/error.jsp?id=500</result>
-      <result name="continuumInitialization" type="redirect">/editConfiguration.action?isNew=true</result>
+
+      <result name="error">/error.jsp</result>
+      <result name="internal-error">/error.jsp</result>
+      <result name="internalError" type="redirect">/error.jsp</result>
+      
+      <result name="continuum-configuration-required" type="redirect-action">
+        <param name="actionName">configuration</param>
+        <param name="method">input</param>
+      </result>
+
+       <!-- The following security-* result names arrive from the plexus-security package -->
+      <result name="security-login-success" type="redirect-action">groupSummary</result>
+      <result name="security-login-cancel" type="redirect-action">groupSummary</result>
+      <result name="security-login-locked" type="redirect-action">
+        <param name="actionName">groupSummary</param>
+        <param name="namespace">/</param>
+        <param name="infoMessage">Account Locked</param> 
+      </result>
+      
+      <result name="security-logout" type="redirect-action">groupSummary</result>
+      <result name="requires-authentication" type="redirect-action">
+        <param name="actionName">login</param>
+        <param name="namespace">/security</param>
+      </result>
+      <result name="security-register-success" type="redirect-action">
+        <param name="actionName">login</param>
+        <param name="namespace">/security</param>
+      </result>
+      <result name="security-register-cancel" type="redirect-action">
+        <param name="actionName">login</param>
+        <param name="namespace">/security</param>
+      </result>
+      <result name="security-account-success" type="redirect-action">groupSummary</result>
+      <result name="security-account-cancel" type="redirect-action">
+        <param name="actionName">login</param>
+        <param name="namespace">/security</param>
+      </result>
+      <result name="security-admin-user-created" type="redirect-action">
+        <param name="actionName">login</param>
+        <param name="namespace">/security</param>
+      </result>
+      <result name="security-admin-user-needed" type="redirect-action">
+        <param name="actionName">addadmin</param>
+        <param name="namespace">/security</param>
+      </result>
     </global-results>
 
     <global-exception-mappings>
@@ -43,19 +104,20 @@
       <exception-mapping exception="java.lang.Exception" result="error-internal"/>
     </global-exception-mappings>
 
-    <action name="checkConfiguration" class="checkConfiguration">
-      <result name="input">/redirectToContinuumInitialization.jsp</result>
+    <!-- This is the redirection facility for plexus-security,
+             allowing plexus-security to call out from its own set of actions
+             into the application webapp, using global result names. -->
+    <action name="pssRedirect" class="pss-redirect" method="redirect">
+      <result type="redirect-action">groupSummary</result>
     </action>
 
-    <action name="editConfiguration" class="configuration" method="edit">
-      <result name="success">/configurationEdit.jsp</result>
-    </action>
 
-    <action name="configuration" class="configuration" method="save">
+    <action name="configuration" class="configuration">
+      <interceptor-ref name="unconfiguredContinuumStack"/>
       <result name="input">/configurationEdit.jsp</result>
       <result name="success">/configuration.jsp</result>
     </action>
-
+   
     <action name="companyInfo" class="configuration">
       <result name="success">/components/companyLogo.jsp</result>
     </action>
@@ -107,62 +169,6 @@
     <action name="projectSave" class="projectEdit" method="save">
       <result name="input">/projectEdit.jsp</result>
       <result name="success" type="chain">projectView</result>
-    </action>
-
-    <!--
-    * Session Influencing actions
-    -->
-    <action name="login" class="session" method="login">
-      <result name="input">/login.jsp</result>
-      <result name="error">/login.jsp</result>
-      <result name="success" type="chain">groupSummary</result>
-    </action>
-
-    <action name="logout" class="session" method="logout">
-      <result name="success" type="chain">groupSummary</result>
-    </action>
-
-
-    <!--
-    * user management actions
-    -->
-    <action name="users" class="userManagement" method="summary">
-      <result name="success">/users.jsp</result>
-    </action>
-
-    <action name="user" class="userManagement" method="input">
-      <result name="success">/user.jsp</result>
-    </action>
-
-    <action name="saveUser" class="userManagement" method="save">
-      <result name="input">/user.jsp</result>
-      <result name="success" type="chain">users</result>
-    </action>
-
-    <action name="removeUser" class="userManagement" method="remove">
-      <result name="confirm">/confirmation.jsp</result>
-      <result name="success" type="chain">users</result>
-    </action>
-
-    <!--
-    * user group management actions
-    -->
-    <action name="userGroups" class="userGroupManagement" method="summary">
-      <result name="success">/userGroups.jsp</result>
-    </action>
-
-    <action name="userGroup" class="userGroupManagement" method="input">
-      <result name="success">/userGroup.jsp</result>
-    </action>
-
-    <action name="saveUserGroup" class="userGroupManagement" method="save">
-      <result name="input">/userGroup.jsp</result>
-      <result name="success" type="chain">userGroups</result>
-    </action>
-
-    <action name="removeUserGroup" class="userGroupManagement" method="remove">
-      <result name="confirm">/confirmation.jsp</result>
-      <result name="success" type="chain">userGroups</result>
     </action>
 
     <!--

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/continuum.tld Thu Oct 12 13:01:45 2006
@@ -112,15 +112,4 @@
     </attribute>
   </tag>
 
-  <tag>
-    <name>ifAuthorized</name>
-    <tagclass>org.apache.maven.continuum.web.view.jsp.ui.IfAuthorizedTag</tagclass>
-    <bodycontent>JSP</bodycontent>
-    <attribute>
-      <name>permission</name>
-      <required>true</required>
-      <rtexprvalue>false</rtexprvalue>
-    </attribute>
-  </tag>
-
 </taglib>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp Thu Oct 12 13:01:45 2006
@@ -2,6 +2,8 @@
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
 <%@ taglib uri="continuum" prefix="c1" %>
+<%@ taglib uri="/plexusSecuritySystem" prefix="pss" %>
+
 <ww:i18n name="localization.Continuum">
 
   <h3>Project Group Build Definitions</h3>
@@ -21,15 +23,22 @@
       <ec:column property="from" title="projectView.buildDefinition.from"/>
       <ec:column property="isDefault" title="projectView.buildDefinition.default"/>
       <ec:column property="editActions" title="Edit">
-          <ww:url id="editUrl" action="buildDefinition" namespace="/">
+
+        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
+          <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
             <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
           </ww:url>
           <ww:a href="%{editUrl}">
               <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit" border="0">
-          </ww:a>        
+          </ww:a>
+        </pss:ifAuthorized>
+        <pss:elseAuthorized>
+          <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit" title="Edit" border="0">
+        </pss:elseAuthorized>
       </ec:column>    
-      <ec:column property="deleteActions" title="Remove">                
+      <ec:column property="deleteActions" title="Remove">
+        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
           <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
             <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
@@ -38,14 +47,20 @@
         <ww:a href="%{removeUrl}">
             <img src="<ww:url value='/images/delete.gif'/>" alt="Delete" title="Delete" border="0">
         </ww:a>
+        </pss:ifAuthorized>
+        <pss:elseAuthorized>
+          <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Delete" title="Delete" border="0">
+        </pss:elseAuthorized>
       </ec:column>
     </ec:row>
   </ec:table>
   <div class="functnbar3">
-    <ww:form action="buildDefinition" method="post" namespace="/">
-      <input type="hidden" name="projectGroupId" value="<ww:property value="projectGroupId"/>"/>
+    <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
+    <ww:form action="buildDefinition" method="post">
+      <input type="hidden" name="projectGroupId" value="<ww:property value="projectGroupid"/>"/>
       <ww:submit value="%{getText('add')}"/>
     </ww:form>
+    </pss:ifAuthorized>
   </div>
 
   <h3>Project Build Definitions</h3>
@@ -75,15 +90,21 @@
         </ww:a>
       </ec:column>
       <ec:column property="editAction" title="&nbsp;">
+        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
           <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
             <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
           </ww:url>
           <ww:a href="%{editUrl}">
               <img src="<ww:url value='/images/edit.gif'/>" alt="Edit" title="Edit" border="0">          
-          </ww:a>          
-      </ec:column>    
-      <ec:column property="removeAction" title="&nbsp;">          
+          </ww:a>
+        </pss:ifAuthorized>
+        <pss:elseAuthorized>
+          <img src="<ww:url value='/images/edit_disabled.gif'/>" alt="Edit" title="Edit" border="0">
+        </pss:elseAuthorized>
+      </ec:column>
+      <ec:column property="removeAction" title="&nbsp;">
+        <pss:ifAuthorized permission="continuum-modify-group" resource="${projectGroupName}">
           <ww:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
             <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
@@ -92,6 +113,10 @@
           <ww:a href="%{removeUrl}">
               <img src="<ww:url value='/images/delete.gif'/>" alt="Edit" title="Edit" border="0">
           </ww:a>
+        </pss:ifAuthorized>
+        <pss:elseAuthorized>
+           <img src="<ww:url value='/images/delete_disabled.gif'/>" alt="Edit" title="Edit" border="0"> 
+        </pss:elseAuthorized>
       </ec:column>
     </ec:row>
   </ec:table>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildDefinitionSummaryComponent.jsp Thu Oct 12 13:01:45 2006
@@ -2,6 +2,8 @@
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
 <%@ taglib uri="continuum" prefix="c1" %>
+<%@ taglib uri="/plexusSecuritySystem" prefix="pss" %>
+
 <ww:i18n name="localization.Continuum">
   <ec:table items="allBuildDefinitionSummaries"
             var="buildDefinitionSummary"
@@ -21,32 +23,47 @@
       <ec:column property="actions" title="&nbsp;">
         <%-- if the from is PROJECT then render the links differently --%>
         <ww:if test="${pageScope.buildDefinitionSummary.from == 'PROJECT'}">
-          <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-          </ww:url>
-          <ww:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-            <ww:param name="confirmed" value="false"/>
-          </ww:url>
+          <pss:ifAuthorized permission="continuum-modify-project-build-definition" resource="${projectGroupName}">
+            <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
+              <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+            </ww:url>
+            <ww:a href="%{editUrl}">
+              <ww:text name="edit"/>
+            </ww:a>
+          </pss:ifAuthorized>
+          <pss:ifAuthorized permission="continuum-remove-project-build-definition" resource="${projectGroupName}">
+            <ww:url id="removeUrl" action="removeProjectBuildDefinition" namespace="/">
+              <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+              <ww:param name="confirmed" value="false"/>
+            </ww:url>
+            <ww:a href="%{removeUrl}">
+              <ww:text name="delete"/>
+            </ww:a>
+          </pss:ifAuthorized>
         </ww:if>
         <ww:else>
-          <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-          </ww:url>
-          <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
-            <ww:param name="projectId">${pageScope.buildDefinitionSummary.projectId}</ww:param>
-            <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
-            <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
-            <ww:param name="confirmed" value="false"/>
-          </ww:url>
+          <pss:ifAuthorized permission="continuum-modify-group-build-definition" resource="${projectGroupName}">
+            <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
+              <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+            </ww:url>
+            <ww:a href="%{editUrl}">
+              <ww:text name="edit"/>
+            </ww:a>
+          </pss:ifAuthorized>
+          <pss:ifAuthorized permission="continuum-remove-group-build-definition">
+            <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
+              <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
+              <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+              <ww:param name="confirmed" value="false"/>
+            </ww:url>
+            <ww:a href="%{removeUrl}">
+              <ww:text name="delete"/>
+            </ww:a>
+          </pss:ifAuthorized>
         </ww:else>
-          <ww:a href="%{editUrl}"><ww:text name="edit"/></ww:a>
-        &nbsp;
-          <ww:a href="%{removeUrl}"><ww:text name="delete"/></ww:a>
       </ec:column>
     </ec:row>
   </ec:table>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildNowCell.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildNowCell.jsp?view=diff&rev=463402&r1=463401&r2=463402
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildNowCell.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/components/buildNowCell.jsp Thu Oct 12 13:01:45 2006
@@ -1,10 +1,11 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
 <%@ taglib uri="continuum" prefix="c1" %>
+<%@ taglib uri="/plexusSecuritySystem" prefix="pss" %>
 
 <ww:i18n name="localization.Continuum">
 
-  <c1:ifAuthorized permission="buildProject">
+  <pss:ifAuthorized permission="continuum-build-group">
     <c:choose>
       <c:when test="${!project.inQueue and ( project.state gt 0 ) and ( project.state lt 5 )}">
         <ww:url id="buildProjectUrl" action="buildProject" namespace="/">
@@ -18,6 +19,6 @@
         <img src="<c:url value='/images/buildnow_disabled.gif'/>" alt="Build Now" title="Build Now" border="0">
       </c:otherwise>
     </c:choose>
-  </c1:ifAuthorized>
+  </pss:ifAuthorized>
 
 </ww:i18n>



Mime
View raw message