From: Arthur Schiwon Date: Thu, 27 Jun 2019 08:33:40 +0000 (+0200) Subject: Also invalidate groups after deletion X-Git-Tag: v16.0.2RC1~9^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41e94f2f1ff0eba1c47cebe8fa1c409436a85117;p=nextcloud-server.git Also invalidate groups after deletion Signed-off-by: Arthur Schiwon --- diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 0780e28f740..2ce35c8f0ef 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -1133,8 +1133,17 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD if ($this->groupPluginManager->implementsActions(GroupInterface::CREATE_GROUP)) { if ($dn = $this->groupPluginManager->createGroup($gid)) { //updates group mapping - $this->access->dn2ocname($dn, $gid, false); - $this->access->connection->writeToCache("groupExists".$gid, true); + $uuid = $this->access->getUUID($dn, false); + if(is_string($uuid)) { + $this->access->mapAndAnnounceIfApplicable( + $this->access->getGroupMapper(), + $dn, + $gid, + $uuid, + false + ); + $this->access->connection->writeToCache("groupExists" . $gid, true); + } } return $dn != null; }