directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-105 - [fortress-core] - fix broken validation
Date Fri, 22 May 2015 14:23:38 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master f7e48b2d7 -> 061320606


FC-105 - [fortress-core] - fix broken validation


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/06132060
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/06132060
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/06132060

Branch: refs/heads/master
Commit: 061320606f2797ae56bde52554b2593d3da8cf92
Parents: f7e48b2
Author: Shawn McKinney <smckinney@apache.org>
Authored: Fri May 22 09:23:35 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Fri May 22 09:23:35 2015 -0500

----------------------------------------------------------------------
 .../org/apache/directory/fortress/core/rbac/AdminRoleP.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/06132060/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
index d9bc1bd..92bf713 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleP.java
@@ -59,7 +59,6 @@ public final class AdminRoleP
     private static final AdminRoleDAO rDao = new AdminRoleDAO();
     private static final OrgUnitP op = new OrgUnitP();
 
-
     /**
      * Package private constructor.
      */
@@ -390,12 +389,12 @@ public final class AdminRoleP
 
         if ( VUtil.isNotNullOrEmpty( entity.getOsU() ) )
         {
-            validateOrgs( entity.getOsU(), entity.getContextId() );
+            validateOrgs( entity.getOsU(), OrgUnit.Type.USER, entity.getContextId() );
         }
 
         if ( VUtil.isNotNullOrEmpty( entity.getOsP() ) )
         {
-            validateOrgs( entity.getOsP(), entity.getContextId() );
+            validateOrgs( entity.getOsP(), OrgUnit.Type.PERM, entity.getContextId() );
         }
     }
 
@@ -406,12 +405,12 @@ public final class AdminRoleP
      * @param contextId
      * @throws SecurityException
      */
-    private void validateOrgs( Set<String> orgs, String contextId ) throws SecurityException
+    private void validateOrgs( Set<String> orgs, OrgUnit.Type type, String contextId
) throws SecurityException
     {
         for ( String ou : orgs )
         {
             OrgUnit inOe = new OrgUnit( ou );
-            inOe.setType( OrgUnit.Type.USER );
+            inOe.setType( type );
             inOe.setContextId( contextId );
             op.read( inOe );
         }


Mime
View raw message