continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r421005 - in /maven/continuum/branches/continuum-acegi: continuum-core/src/main/java/org/apache/maven/continuum/initialization/ continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ continuum-w...
Date Tue, 11 Jul 2006 22:00:30 GMT
Author: carlos
Date: Tue Jul 11 15:00:29 2006
New Revision: 421005

URL: http://svn.apache.org/viewvc?rev=421005&view=rev
Log:
Use previous continuum permission names as roles

Modified:
    maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
    maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ContinuumUserDetailsService.java
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/navigations/Menu.jsp

Modified: maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java?rev=421005&r1=421004&r2=421005&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
Tue Jul 11 15:00:29 2006
@@ -163,9 +163,7 @@
 
         createPermission( "manageUsers", "Manage Users/Groups" );
 
-        createPermission( "ROLE_USER", "Authenticated User" );
-
-        createPermission( "ROLE_ADMIN", "Administrator" );
+        createPermission( "user", "Authenticated User" );
     }
 
     private Permission createPermission( String name, String description )

Modified: maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ContinuumUserDetailsService.java
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ContinuumUserDetailsService.java?rev=421005&r1=421004&r2=421005&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ContinuumUserDetailsService.java
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-security/continuum-security-acegi/src/main/java/org/apache/maven/continuum/security/acegi/ContinuumUserDetailsService.java
Tue Jul 11 15:00:29 2006
@@ -102,7 +102,7 @@
         while ( it.hasNext() )
         {
             Permission permission = (Permission) it.next();
-            grantedAuthorities[i] = new GrantedAuthorityImpl( permission.getName() );
+            grantedAuthorities[i] = new GrantedAuthorityImpl( "ROLE_" + permission.getName()
);
             i++;
         }
         String username = user.getUsername();

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml?rev=421005&r1=421004&r2=421005&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
Tue Jul 11 15:00:29 2006
@@ -447,25 +447,25 @@
             <filterInvocationDefinitionSourceMapping>
               <url>/secure/**</url>
               <configAttributes>
-                <configAttribute>ROLE_ADMIN</configAttribute>
+                <configAttribute>ROLE_user</configAttribute>
               </configAttributes>
             </filterInvocationDefinitionSourceMapping>
             <filterInvocationDefinitionSourceMapping>
               <url>/add*project*</url>
               <configAttributes>
-                <configAttribute>ROLE_ADMIN</configAttribute>
+                <configAttribute>ROLE_addProject</configAttribute>
               </configAttributes>
             </filterInvocationDefinitionSourceMapping>
             <filterInvocationDefinitionSourceMapping>
               <url>/schedules*</url>
               <configAttributes>
-                <configAttribute>ROLE_ADMIN</configAttribute>
+                <configAttribute>ROLE_manageSchedule</configAttribute>
               </configAttributes>
             </filterInvocationDefinitionSourceMapping>
             <filterInvocationDefinitionSourceMapping>
               <url>/configuration*</url>
               <configAttributes>
-                <configAttribute>ROLE_ADMIN</configAttribute>
+                <configAttribute>ROLE_manageConfiguration</configAttribute>
               </configAttributes>
             </filterInvocationDefinitionSourceMapping>
           </mappings>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/navigations/Menu.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/navigations/Menu.jsp?rev=421005&r1=421004&r2=421005&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/navigations/Menu.jsp
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/navigations/Menu.jsp
Tue Jul 11 15:00:29 2006
@@ -15,7 +15,7 @@
     </div>
   </div>
 
-  <authz:authorize ifAllGranted="ROLE_ADMIN">
+  <authz:authorize ifAllGranted="ROLE_addProject">
     <div id="projectmenu" class="toolgroup">
       <div class="label"><ww:text name="menu.addProject"/></div>
       <div>
@@ -35,16 +35,20 @@
     </div>
   </authz:authorize>      
 
-  <authz:authorize ifAllGranted="ROLE_ADMIN">
+  <authz:authorize ifAnyGranted="ROLE_manageSchedule,ROLE_manageConfiguration">
     <div id="projectmenu" class="toolgroup">
       <div class="label"><ww:text name="menu.administration"/></div>
       <div>
-        <div class="body">
-          <a href="<ww:url value="schedules.action"/>"><ww:text name="menu.administration.schedules"/></a>
-        </div>
-        <div class="body">
-          <a href="<ww:url value="configuration!default.action"/>"><ww:text
name="menu.administration.configuration"/></a>
-        </div>
+        <authz:authorize ifAllGranted="ROLE_manageSchedule">
+          <div class="body">
+            <a href="<ww:url value="schedules.action"/>"><ww:text name="menu.administration.schedules"/></a>
+          </div>
+        </authz:authorize>      
+        <authz:authorize ifAllGranted="ROLE_manageConfiguration">
+          <div class="body">
+            <a href="<ww:url value="configuration!default.action"/>"><ww:text
name="menu.administration.configuration"/></a>
+          </div>
+        </authz:authorize>      
       </div>
     </div>
   </authz:authorize>      



Mime
View raw message