Skip to content

Commit

Permalink
Fix: clear local cache also if permission is reset to default
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-rueegg committed Dec 17, 2023
1 parent e540c88 commit 0803a59
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public function setGroupState($groupId, $permission, $state)
if ($state === '' || $state === null) {
if ($record !== null) {
$record->delete();
$this->clear();
}
return;
}
Expand All @@ -193,7 +194,7 @@ public function setGroupState($groupId, $permission, $state)
$record->permission_id = $permission->getId();
$record->module_id = $permission->getModuleId();
$record->class = get_class($permission);
$record->group_id = $groupId;
$record->group_id = (string)$groupId; // content container permissions require a text value here
$record->state = $state;

if ($record->save() === false) {
Expand Down

0 comments on commit 0803a59

Please sign in to comment.