Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/inc/utils/AccessGroupUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use DBA\AccessGroupAgent;
use DBA\Hashlist;
use DBA\Factory;
use DBA\File;

class AccessGroupUtils {
/**
Expand Down Expand Up @@ -175,6 +176,11 @@ public static function deleteGroup($groupId) {
$qF = new QueryFilter(Hashlist::ACCESS_GROUP_ID, $group->getId(), "=");
$uS = new UpdateSet(Hashlist::ACCESS_GROUP_ID, $default->getId());
Factory::getHashlistFactory()->massUpdate([Factory::FILTER => $qF, Factory::UPDATE => $uS]);

// update associations of files with this group
$qF = new QueryFilter(File::ACCESS_GROUP_ID, $group->getId(), "=");
$uS = new UpdateSet(File::ACCESS_GROUP_ID, $default->getId());
Factory::getFileFactory()->massUpdate([Factory::FILTER => $qF, Factory::UPDATE => $uS]);

// delete all associations to users
$qF = new QueryFilter(AccessGroupUser::ACCESS_GROUP_ID, $group->getId(), "=");
Expand Down