Fix access to own user container (#6541)

This commit is contained in:
Yuriy Bakhtin 2023-09-07 16:11:40 +02:00 committed by GitHub
parent d94a3bbf57
commit a5f410e8ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -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)
----------------------

View File

@ -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);
}