diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index abf4a1e212..4f2acea905 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -23,6 +23,7 @@ HumHub Change Log - Fix #4034: Premission filter pagination shown without reason and broken - Fix #4012: Permission filter dropdown shows module id instead of module name - Fix #4046: Search results not highlighted +- Fix #3975: Space chooser directory button visible, even if user is not allowed to access directory 1.5.1 (April 19, 2020) ---------------------- diff --git a/protected/humhub/modules/space/widgets/views/spaceChooser.php b/protected/humhub/modules/space/widgets/views/spaceChooser.php index 96f347ffb1..8cf0432e86 100755 --- a/protected/humhub/modules/space/widgets/views/spaceChooser.php +++ b/protected/humhub/modules/space/widgets/views/spaceChooser.php @@ -1,6 +1,7 @@ registerJsConfig('space.chooser', [ /* @var $directoryModule \humhub\modules\directory\Module */ $directoryModule = Yii::$app->getModule('directory'); -$isDirectoryActive = $directoryModule->active; +$canAccessDirectory = $directoryModule->active && Yii::$app->user->can(AccessDirectory::class); ?> @@ -59,11 +60,11 @@ $isDirectoryActive = $directoryModule->active;