diff --git a/CHANGELOG.md b/CHANGELOG.md index 119046ea32..fdebd45faf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ HumHub Changelog ------------------- - Fix #6251: Emulate execution on `readable()` content - Enh #6252: Implement new method to handle changing of content active record state +- Enh #6248: If admins can view all contents, users allowed to manage spaces or users cannot view all content (they should be able) - Enh #6255: Updated activities to same state as parent record 1.14.0 (April 20, 2023) diff --git a/protected/humhub/modules/user/models/User.php b/protected/humhub/modules/user/models/User.php index 1a1d8ae394..c40ccdd89a 100644 --- a/protected/humhub/modules/user/models/User.php +++ b/protected/humhub/modules/user/models/User.php @@ -759,8 +759,8 @@ class User extends ContentContainerActiveRecord implements IdentityInterface, Se return $module->adminCanViewAllContent && ( $this->isSystemAdmin() - || ($containerClass === Space::class && $this->can(ManageSpaces::class)) - || ($containerClass === static::class && $this->can(ManageUsers::class)) + || ($containerClass === Space::class && (new PermissionManager(['subject' => $this]))->can(ManageSpaces::class)) + || ($containerClass === static::class && (new PermissionManager(['subject' => $this]))->can(ManageUsers::class)) ); }