]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also invalidate groups after deletion 16113/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Thu, 27 Jun 2019 08:33:40 +0000 (10:33 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 27 Jun 2019 10:22:33 +0000 (10:22 +0000)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/user_ldap/lib/Group_LDAP.php

index 0780e28f7407297f3e1c005a78fdcf052c45d53f..2ce35c8f0ef44633a7c49ec8ec949a21fb2deaa4 100644 (file)
@@ -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;
                }