mirror of
https://github.com/humhub/humhub.git
synced 2025-02-19 23:54:54 +01:00
unset modules items for nonmembers in menu
This commit is contained in:
parent
27e2767ac8
commit
d1045e9d64
@ -46,15 +46,26 @@ class Menu extends LeftNavigation
|
||||
|
||||
$this->panelTitle = Yii::t('SpaceModule.base', '<strong>Space</strong> menu');
|
||||
|
||||
parent::init();
|
||||
|
||||
if (!$this->space->isMember())
|
||||
$this->entries = [];
|
||||
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('SpaceModule.base', 'Stream'),
|
||||
'url' => $this->space->createUrl('/space/space/home'),
|
||||
'icon' => 'fa-bars',
|
||||
'icon' => 'bars',
|
||||
'sortOrder' => 100,
|
||||
'isActive' => MenuLink::isActiveState('space', 'space', ['index', 'home']),
|
||||
]));
|
||||
|
||||
parent::init();
|
||||
$this->addEntry(new MenuLink([
|
||||
'label' => Yii::t('SpaceModule.base', 'About Space'),
|
||||
'url' => $this->space->createUrl('/space/space/about'),
|
||||
'icon' => 'info-circle',
|
||||
'sortOrder' => 100,
|
||||
'isActive' => MenuLink::isActiveState('space', 'space', ['about']),
|
||||
]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user