continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r450316 - in /maven/continuum/branches/rbac-integration: continuum-core/src/test/resources/org/apache/maven/continuum/ continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ continuum-webapp/src/main/java/org/apache/m...
Date Wed, 27 Sep 2006 05:09:13 GMT
Author: jmcconnell
Date: Tue Sep 26 22:09:12 2006
New Revision: 450316

URL: http://svn.apache.org/viewvc?view=rev&rev=450316
Log:
working login, admin account creation and the merging of system administrator roles

Modified:
    maven/continuum/branches/rbac-integration/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
    maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp

Modified: maven/continuum/branches/rbac-integration/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
(original)
+++ maven/continuum/branches/rbac-integration/continuum-core/src/test/resources/org/apache/maven/continuum/DefaultContinuumTest.xml
Tue Sep 26 22:09:12 2006
@@ -28,7 +28,13 @@
       </configuration>
     </component>
 
-     <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>

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ContinuumSystemAdministratorRoleProfile.java
Tue Sep 26 22:09:12 2006
@@ -50,4 +50,10 @@
 
         return operations;
     }
+
+
+    public boolean isAssignable()
+    {
+        return false;
+    }
 }

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupDeveloperDynamicRoleProfile.java
Tue Sep 26 22:09:12 2006
@@ -56,4 +56,10 @@
     {
         return Collections.singletonList( ContinuumRoleConstants.CONTINUUM_PROJECT_USER_ROLE_PREFIX
+ ContinuumRoleConstants.DELIMITER + string );
     }
+
+
+    public boolean isAssignable()
+    {
+        return true;
+    }
 }

Modified: maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-security/src/main/java/org/apache/maven/continuum/security/profile/ProjectGroupUserDynamicRoleProfile.java
Tue Sep 26 22:09:12 2006
@@ -49,4 +49,10 @@
 
         return operations;
     }
+
+
+    public boolean isAssignable()
+    {
+        return true;
+    }
 }

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/java/org/apache/maven/continuum/web/checks/security/RoleProfileEnvironmentCheck.java
Tue Sep 26 22:09:12 2006
@@ -40,7 +40,6 @@
      */
     private RoleProfileManager continuumRoleManager;
 
-
     public void validateEnvironment( List list )
     {
         try

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/xwork.xml
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/resources/xwork.xml
Tue Sep 26 22:09:12 2006
@@ -11,6 +11,7 @@
 
     <interceptors>
       <interceptor name="exception-logging" class="exceptionLogging"/>
+      <interceptor name="pssForceAdminUser" class="pssForceAdminUserInterceptor"/>
       <interceptor name="pssSecureActions" class="pssSecureActionInterceptor"/>
       <interceptor name="pssEnvironmentChecker" class="pssEnvironmentCheckInterceptor"/>
       
@@ -18,6 +19,7 @@
         <interceptor-ref name="defaultStack"/>
         <interceptor-ref name="exception-logging"/>
         <interceptor-ref name="pssEnvironmentChecker"/>
+        <interceptor-ref name="pssForceAdminUser"/>
         <interceptor-ref name="pssSecureActions"/>
       </interceptor-stack>
     </interceptors>
@@ -30,10 +32,10 @@
       <result name="continuumInitialization" type="redirect">/configuration!input.action</result>
 
        <!-- The following security-* result names arrive from the plexus-security package
-->
-      <result name="security-login-success" type="redirect-action">browse</result>
-      <result name="security-login-cancel" type="redirect-action">browse</result>
-      <result name="security-login-locked" type="redirect-action">browse</result>
-      <result name="security-logout" type="redirect-action">browse</result>
+      <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">groupSummary</result>
+      <result name="security-logout" type="redirect-action">groupSummary</result>
       <result name="security-register-success" type="redirect-action">
         <param name="actionName">login</param>
         <param name="namespace">/security</param>
@@ -42,9 +44,20 @@
         <param name="actionName">login</param>
         <param name="namespace">/security</param>
       </result>
-      <result name="security-account-success" type="redirect-action">browse</result>
-      <result name="security-account-cancel" type="redirect-action">browse</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>

Modified: maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp?view=diff&rev=450316&r1=450315&r2=450316
==============================================================================
--- maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
(original)
+++ maven/continuum/branches/rbac-integration/continuum-webapp/src/main/webapp/navigations/Menu.jsp
Tue Sep 26 22:09:12 2006
@@ -1,6 +1,8 @@
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
 <%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c' %>
+<%@ taglib uri="/plexusSecuritySystem" prefix="pss" %>
+
 <ww:i18n name="localization.Continuum">
 <div id="navcolum">
   <div id="projectmenu" class="toolgroup">
@@ -32,26 +34,31 @@
     </div>
   </div>
 
+  <pss:ifAnyAuthorized permissions="continuum-manage-schedules,continuum-manage-configuration,continuum-manage-users">
   <div id="projectmenu" class="toolgroup">
     <div class="label"><ww:text name="menu.administration"/></div>
     <div>
+      <pss:ifAuthorized permission="continuum-manage-schedules">
+        <ww:url id="scheduleUrl" action="schedules"/>
         <div class="body">
-          <a href="<ww:url value="schedules.action"/>"><ww:text name="menu.administration.schedules"/></a>
+          <ww:a href="%{scehduleUrl}"><ww:text name="menu.administration.schedules"/></ww:a>
         </div>
+      </pss:ifAuthorized>
+      <pss:ifAuthorized permission="continuum-manage-configuration">
+        <ww:url id="configurationUrl" action="configuration" method="default"/>
         <div class="body">
-          <a href="<ww:url value="configuration!default.action"/>"><ww:text
-              name="menu.administration.configuration"/></a>
+          <ww:a href="%{configurationUrl}"><ww:text name="menu.administration.configuration"/></ww:a>
         </div>
+      </pss:ifAuthorized>
+      <pss:ifAuthorized permission="continuum-manage-users">
+        <ww:url id="userManagementUrl" action="users"/>
         <div class="body">
-          <ww:url id="userManagementUrl" action="users"/>
           <ww:a href="%{userManagementUrl}">Users</ww:a>
         </div>
-        <div class="body">
-          <ww:url id="userGroupManagementUrl" action="userGroups"/>
-          <ww:a href="%{userGroupManagementUrl}">User Groups</ww:a>
-        </div>
+      </pss:ifAuthorized>
     </div>
   </div>
+  </pss:ifAnyAuthorized>
   <div id="projectmenu" class="toolgroup">
     <div class="label">Legend</div>
     <div id="legend">



Mime
View raw message