continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r450353 - in /maven/continuum/branches/rbac-integration: continuum-core/src/main/java/org/apache/maven/continuum/core/action/ continuum-core/src/main/resources/META-INF/plexus/ continuum-webapp/src/main/webapp/ continuum-webapp/src/main/web...
Date Wed, 27 Sep 2006 06:55:32 GMT
Author: jmcconnell
Date: Tue Sep 26 23:55:31 2006
New Revision: 450353

URL: http://svn.apache.org/viewvc?view=rev&rev=450353
Log:
switched the resource that project group permissions are bound with from the project group
id to the project group name and have sample usage working on the project group summary page

Modified:
    maven/continuum/branches/rbac-integration/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
    maven/continuum/branches/rbac-integration/continuum-core/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/projectGroupSummary.jsp

Modified: maven/continuum/branches/rbac-integration/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java?view=diff&rev=450353&r1=450352&r2=450353
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
Tue Sep 26 23:55:31 2006
@@ -1,7 +1,9 @@
 package org.apache.maven.continuum.core.action;
 
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.rbac.profile.RoleProfileException;
 import org.codehaus.plexus.rbac.profile.RoleProfileManager;
 import org.codehaus.plexus.security.rbac.Role;
@@ -36,7 +38,7 @@
 public class AddAssignableRolesAction
     extends AbstractContinuumAction
 {
-//    private ContinuumStore store;
+    private ContinuumStore store;
 
     private RoleProfileManager roleManager;
 
@@ -45,19 +47,19 @@
     {
         int projectGroupId =  getProjectGroupId( context );
 
-  //      ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId
);
+        ProjectGroup projectGroup = store.getProjectGroupWithBuildDetails( projectGroupId
);
 
         //todo make the resource the name of the project group and hide the id from the user
 
         try
         {
-            Role developer = roleManager.getDynamicRole( "continuum-group-developer", ""
+ projectGroupId );
+            Role developer = roleManager.getDynamicRole( "continuum-group-developer", projectGroup.getName()
);
 
-            Role user = roleManager.getDynamicRole( "continuum-group-user", ""  + projectGroupId
);
+            Role user = roleManager.getDynamicRole( "continuum-group-user", projectGroup.getName()
);
         }
         catch ( RoleProfileException rpe )
         {
-            throw new ContinuumException( "error generating dynamic role for project " +
projectGroupId );
+            throw new ContinuumException( "error generating dynamic role for project " +
projectGroup.getName() );
         }
     }
 }

Modified: maven/continuum/branches/rbac-integration/continuum-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-core/src/main/resources/META-INF/plexus/components.xml?view=diff&rev=450353&r1=450352&r2=450353
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-core/src/main/resources/META-INF/plexus/components.xml
(original)
+++ maven/continuum/branches/rbac-integration/continuum-core/src/main/resources/META-INF/plexus/components.xml
Tue Sep 26 23:55:31 2006
@@ -567,11 +567,9 @@
       <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>

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp?view=diff&rev=450353&r1=450352&r2=450353
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/components/buildDefinitionGroupSummaryComponent.jsp
Tue Sep 26 23:55:31 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>Group Build Definitions</h3>

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/projectGroupSummary.jsp?view=diff&rev=450353&r1=450352&r2=450353
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/projectGroupSummary.jsp
Tue Sep 26 23:55:31 2006
@@ -27,17 +27,17 @@
       </table>
     </div>
 
-    <pss:ifAnyAuthorized permissions="continuum-build-group,continuum-remove-group" resource="${projectGroupId}">
+    <pss:ifAnyAuthorized permissions="continuum-build-group,continuum-remove-group" resource="${projectGroup.name}">
       <h3>Project Group Actions</h3>
 
       <div class="functnbar3">
-        <pss:ifAuthorized permission="continuum-build-group" resource="${projectGroupId}">
+        <pss:ifAuthorized permission="continuum-build-group" resource="${projectGroup.name}">
           <ww:url id="buildProjectGroupUrl" action="buildProjectGroup">
             <ww:param name="projectGroupId" value="projectGroupId"/>
           </ww:url>
           <ww:a href="%{buildProjectGroupUrl}">Build</ww:a>
         </pss:ifAuthorized>
-        <pss:ifAuthorized permission="continuum-remove-group" resource="${projectGroupId}">
+        <pss:ifAuthorized permission="continuum-remove-group" resource="${projectGroup.name}">
           <ww:url id="removeProjectGroupUrl" action="removeProjectGroup">
             <ww:param name="projectGroupId" value="projectGroupId"/>
             <ww:param name="confirmed" value="false"/>



Mime
View raw message