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: addRoleConstraint contextId not getting set on entity cause multitenancy bug.
Date Wed, 24 Oct 2018 19:10:34 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 03dda314f -> 4d2a61302


addRoleConstraint contextId not getting set on entity cause multitenancy bug.


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/4d2a6130
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/4d2a6130
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/4d2a6130

Branch: refs/heads/master
Commit: 4d2a6130265dd23dcefc0d693398920f8dccfabc
Parents: 03dda31
Author: Shawn McKinney <smckinney@apache.org>
Authored: Tue Oct 23 16:58:04 2018 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Tue Oct 23 16:58:04 2018 -0500

----------------------------------------------------------------------
 .../org/apache/directory/fortress/core/impl/AdminMgrImpl.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/4d2a6130/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java b/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
index 1cf8df6..3a7ec5c 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/AdminMgrImpl.java
@@ -459,7 +459,9 @@ public final class AdminMgrImpl extends Manageable implements AdminMgr,
Serializ
         setEntitySession( CLS_NM, methodName, uRole );
 
         // Validate the user-role assignment exists:
-        List<String> assignedRoles = userP.getAssignedRoles( new User( uRole.getUserId()
) );
+        User user = new User( uRole.getUserId());
+        user.setContextId( contextId );
+        List<String> assignedRoles = userP.getAssignedRoles( user );
         assertContext( CLS_NM, methodName, uRole, GlobalErrIds.URLE_NULL );
         // Do not assign role constraint to user if not assigned the role itself.
         if ( CollectionUtils.isEmpty( assignedRoles ) || !assignedRoles.stream().anyMatch(
uRole.getName()::equalsIgnoreCase) )


Mime
View raw message