From a5f410e8ced97014534d5ca7ddb69a703f31c6d8 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 7 Sep 2023 16:11:40 +0200 Subject: [PATCH] Fix access to own user container (#6541) --- CHANGELOG.md | 1 + .../content/components/ContentContainerControllerAccess.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36a876f588..711b9164c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ HumHub Changelog - Fix #6507: Reload page after accepting of invite in Space header - Fix #6531: Fix active style for `btn-lg` - Fix #6534: Cannot change Homepage of space in PHP 8.x +- Fix #6464: Fix access to own user container 1.14.3 (July 27, 2023) ---------------------- diff --git a/protected/humhub/modules/content/components/ContentContainerControllerAccess.php b/protected/humhub/modules/content/components/ContentContainerControllerAccess.php index eeb02c8385..deb78cc4fe 100644 --- a/protected/humhub/modules/content/components/ContentContainerControllerAccess.php +++ b/protected/humhub/modules/content/components/ContentContainerControllerAccess.php @@ -167,13 +167,15 @@ class ContentContainerControllerAccess extends StrictAccess */ public function isAdmin() { - if(parent::isAdmin()) { + if (parent::isAdmin()) { return true; } if ($this->contentContainer instanceof Space) { return $this->contentContainer->isAdmin($this->user); - } elseif($this->contentContainer instanceof Space) { + } + + if ($this->contentContainer instanceof User) { return $this->user && $this->user->is($this->contentContainer); }