You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2022/03/22 16:27:28 UTC

[syncope] branch 2_1_X updated: Fixing security checks in case of realm change during Group update

This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 2_1_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/2_1_X by this push:
     new 27e0964  Fixing security checks in case of realm change during Group update
27e0964 is described below

commit 27e09642c92eac513050a2287a8912c8a055f9e7
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue Mar 22 17:15:14 2022 +0100

    Fixing security checks in case of realm change during Group update
---
 core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
index 4aa83ef..5959264 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/GroupLogic.java
@@ -209,6 +209,9 @@ public class GroupLogic extends AbstractAnyLogic<GroupTO, GroupPatch> {
                 before.getRight());
 
         // check if group can still be managed by the caller
+        authRealms = RealmUtils.getEffective(
+                AuthContextUtils.getAuthorizations().get(StandardEntitlement.GROUP_UPDATE),
+                result.getEntity().getRealm());
         groupDAO.securityChecks(
                 authRealms,
                 after.getLeft().getKey(),