From a5b62b6b0e9cac05952b09e90e93a4293bb78533 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 26 Oct 2023 17:21:50 +0200 Subject: [PATCH] Refresh cache after set a permission (#6634) --- CHANGELOG-DEV.md | 1 + .../humhub/modules/user/components/PermissionManager.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-DEV.md b/CHANGELOG-DEV.md index 6bd6975a4c..cac5b19b9a 100644 --- a/CHANGELOG-DEV.md +++ b/CHANGELOG-DEV.md @@ -9,6 +9,7 @@ HumHub Changelog - Enh #6623: Add a hint in the "Dropdown space order" settings to inform that a manual sort is always applied first - Enh #6626: Content state flag "was published" - Enh #6628: Add self test check: "Mobile App - Push Service" +- Fix #6634: Refresh cache after set a permission 1.15.0-beta.2 (October 5, 2023) ------------------------------- diff --git a/protected/humhub/modules/user/components/PermissionManager.php b/protected/humhub/modules/user/components/PermissionManager.php index 282ccffa42..e097709944 100644 --- a/protected/humhub/modules/user/components/PermissionManager.php +++ b/protected/humhub/modules/user/components/PermissionManager.php @@ -183,7 +183,9 @@ class PermissionManager extends Component $record->class = get_class($permission); $record->group_id = $groupId; $record->state = $state; - $record->save(); + if ($record->save()) { + $this->clear(); + } } /**