mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Enh: Show Spaces always in Guest Mode (#5931)
* Show always Spaces page in Guest mode * Updated Changelog
This commit is contained in:
parent
4c2398ca43
commit
204a22f7d4
@ -25,4 +25,5 @@ HumHub Changelog
|
||||
- Fix #5926: Renamed default profile field `Url` to `Website URL`
|
||||
- Enh #5686: Add the logo image to the registration page
|
||||
- Fix #5856: Fixed Mail Settings Help Text SMTPS Port to 465
|
||||
- Enh #5929: Add property `createMode` for wall stream entry widget
|
||||
- Enh #5931: Show `Spaces` pages always when in Guest Mode
|
||||
- Enh #5929: Add property `createMode` for wall stream entry widget
|
||||
|
@ -107,17 +107,14 @@ class Events extends BaseObject
|
||||
*/
|
||||
public static function onTopMenuInit($event)
|
||||
{
|
||||
if (Yii::$app->user->isGuest) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** @var Module $module */
|
||||
$module = Yii::$app->getModule('space');
|
||||
if ($module->hideSpacesPage) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Yii::$app->user->can(SpaceDirectoryAccess::class)) {
|
||||
if (!Yii::$app->user->isGuest &&
|
||||
!Yii::$app->user->can(SpaceDirectoryAccess::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -40,17 +40,6 @@ class SpacesController extends Controller
|
||||
parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getAccessRules()
|
||||
{
|
||||
return [
|
||||
[ControllerAccess::RULE_LOGGED_IN_ONLY],
|
||||
['permissions' => [SpaceDirectoryAccess::class]],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Action to display spaces page
|
||||
*/
|
||||
@ -85,4 +74,4 @@ class SpacesController extends Controller
|
||||
return $spaceCards;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user