mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fixed missing imports in admin module permissions
This commit is contained in:
parent
ba74c0fd9b
commit
df38c021c2
@ -2,13 +2,15 @@
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @copyright Copyright (c) 2017 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\modules\admin;
|
||||
|
||||
use Yii;
|
||||
use humhub\modules\user\models\User;
|
||||
use humhub\modules\space\models\Space;
|
||||
|
||||
/**
|
||||
* Admin Module
|
||||
@ -35,29 +37,31 @@ class Module extends \humhub\components\Module
|
||||
* @var boolean is marketplace enabled?
|
||||
*/
|
||||
public $marketplaceEnabled = true;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public $resourcesPath = 'resources';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @var boolean check daily for new HumHub version
|
||||
*/
|
||||
public $dailyCheckForNewVersion = true;
|
||||
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return Yii::t('AdminModule.base', 'Admin');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getPermissions($contentContainer = null)
|
||||
{
|
||||
if ($contentContainer instanceof \humhub\modules\space\models\Space) {
|
||||
if ($contentContainer instanceof Space) {
|
||||
return [];
|
||||
} elseif ($contentContainer instanceof User) {
|
||||
return [];
|
||||
@ -76,13 +80,14 @@ class Module extends \humhub\components\Module
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getNotifications()
|
||||
public function getNotifications()
|
||||
{
|
||||
if(Yii::$app->user->isAdmin()) {
|
||||
if (Yii::$app->user->isAdmin()) {
|
||||
return [
|
||||
'humhub\modules\admin\notifications\NewVersionAvailable'
|
||||
];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user