portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject svn commit: r369982 - in /portals/jetspeed-2/trunk/components/security: etc/ src/java/org/apache/jetspeed/security/impl/ src/java/org/apache/jetspeed/security/spi/
Date Wed, 18 Jan 2006 00:35:33 GMT
Author: dlestrat
Date: Tue Jan 17 16:35:27 2006
New Revision: 369982

URL: http://svn.apache.org/viewcvs?rev=369982&view=rev
Log:
http://issues.apache.org/jira/browse/JS2-470

Contributions from Davy De Waele.

Modified:
    portals/jetspeed-2/trunk/components/security/etc/security-spi-ldap.xml
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/RoleSecurityHandler.java
    portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java

Modified: portals/jetspeed-2/trunk/components/security/etc/security-spi-ldap.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/etc/security-spi-ldap.xml?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/etc/security-spi-ldap.xml (original)
+++ portals/jetspeed-2/trunk/components/security/etc/security-spi-ldap.xml Tue Jan 17 16:35:27
2006
@@ -38,6 +38,9 @@
       <constructor-arg index="7"><value>users</value></constructor-arg>
       <!-- The groups org unit. -->
       <constructor-arg index="8"><value>groups</value></constructor-arg>
+      <!-- The roles org unit. -->
+      <constructor-arg index="9"><value>roles</value></constructor-arg>
+      
   </bean>
 
 </beans>

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/GroupManagerImpl.java
Tue Jan 17 16:35:27 2006
@@ -298,8 +298,7 @@
                 "addUserToGroup(java.lang.String, java.lang.String)");
 
         // Get the group principal to add to user.
-        Principal groupPrincipal = groupSecurityHandler
-                .getGroupPrincipal(groupFullPathName);
+        GroupPrincipal groupPrincipal = groupSecurityHandler.getGroupPrincipal(groupFullPathName);
         if (null == groupPrincipal) { 
             throw new SecurityException(SecurityException.GROUP_DOES_NOT_EXIST.create(groupFullPathName));

         }
@@ -309,13 +308,11 @@
             throw new SecurityException(SecurityException.USER_DOES_NOT_EXIST.create(username));
         }
         // Get the user groups.
-        Set groupPrincipals = securityMappingHandler
-                .getGroupPrincipals(username);
+        Set groupPrincipals = securityMappingHandler.getGroupPrincipals(username);
         // Add group to user.
         if (!groupPrincipals.contains(groupPrincipal))
         {
-            securityMappingHandler.setUserPrincipalInGroup(username,
-                    groupFullPathName);
+            securityMappingHandler.setUserPrincipalInGroup(username,groupFullPathName);
         }
     }
 

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/impl/RoleManagerImpl.java
Tue Jan 17 16:35:27 2006
@@ -287,7 +287,7 @@
         // Add role to user.
         if (!rolePrincipals.contains(rolePrincipal))
         {
-            securityMappingHandler.setRolePrincipal(username, roleFullPathName);
+            securityMappingHandler.setUserPrincipalInRole(username, roleFullPathName);
         }
     }
 
@@ -310,7 +310,7 @@
         Principal rolePrincipal = roleSecurityHandler.getRolePrincipal(roleFullPathName);
         if (null != rolePrincipal)
         {
-            securityMappingHandler.removeRolePrincipal(username, roleFullPathName);
+            securityMappingHandler.removeUserPrincipalInRole(username, roleFullPathName);
         }
     }
 

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/GroupSecurityHandler.java
Tue Jan 17 16:35:27 2006
@@ -46,7 +46,7 @@
      * @param groupFullPathName The group full path name.
      * @return The <code>Principal</p>
      */
-    Principal getGroupPrincipal(String groupFullPathName);
+    GroupPrincipal getGroupPrincipal(String groupFullPathName);
     
     /**
      * <p>

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/RoleSecurityHandler.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/RoleSecurityHandler.java?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/RoleSecurityHandler.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/RoleSecurityHandler.java
Tue Jan 17 16:35:27 2006
@@ -47,7 +47,7 @@
      * @param roleFullPathName The role full path name.
      * @return The <code>Principal</p>
      */
-    Principal getRolePrincipal(String roleFullPathName);
+    RolePrincipal getRolePrincipal(String roleFullPathName);
     
     /**
      * <p>

Modified: portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java?rev=369982&r1=369981&r2=369982&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java
(original)
+++ portals/jetspeed-2/trunk/components/security/src/java/org/apache/jetspeed/security/spi/SecurityMappingHandler.java
Tue Jan 17 16:35:27 2006
@@ -93,7 +93,7 @@
      * @throws SecurityException Throws a {@link SecurityException}.  An exeption needs to
be
      * 							 thrown if the user does not exist.
      */
-    void setRolePrincipal(String username, String roleFullPathName) throws SecurityException;
+    void setUserPrincipalInRole(String username, String roleFullPathName) throws SecurityException;
     
     /**
      * <p>
@@ -109,7 +109,7 @@
      * @throws SecurityException Throws a {@link SecurityException}.  An exeption needs to
be
      * 							 thrown if the user does not exist.
      */
-    void removeRolePrincipal(String username, String roleFullPathName) throws SecurityException;
+    void removeUserPrincipalInRole(String username, String roleFullPathName) throws SecurityException;
 
     /**
      * <p>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message