mirror of
https://github.com/humhub/humhub.git
synced 2025-01-18 06:38:14 +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/
|
* @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
|
* @license https://www.humhub.com/licences
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace humhub\modules\admin;
|
namespace humhub\modules\admin;
|
||||||
|
|
||||||
use Yii;
|
use Yii;
|
||||||
|
use humhub\modules\user\models\User;
|
||||||
|
use humhub\modules\space\models\Space;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin Module
|
* Admin Module
|
||||||
@ -35,29 +37,31 @@ class Module extends \humhub\components\Module
|
|||||||
* @var boolean is marketplace enabled?
|
* @var boolean is marketplace enabled?
|
||||||
*/
|
*/
|
||||||
public $marketplaceEnabled = true;
|
public $marketplaceEnabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public $resourcesPath = 'resources';
|
public $resourcesPath = 'resources';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean check daily for new HumHub version
|
* @var boolean check daily for new HumHub version
|
||||||
*/
|
*/
|
||||||
public $dailyCheckForNewVersion = true;
|
public $dailyCheckForNewVersion = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
return Yii::t('AdminModule.base', 'Admin');
|
return Yii::t('AdminModule.base', 'Admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function getPermissions($contentContainer = null)
|
public function getPermissions($contentContainer = null)
|
||||||
{
|
{
|
||||||
if ($contentContainer instanceof \humhub\modules\space\models\Space) {
|
if ($contentContainer instanceof Space) {
|
||||||
return [];
|
return [];
|
||||||
} elseif ($contentContainer instanceof User) {
|
} elseif ($contentContainer instanceof User) {
|
||||||
return [];
|
return [];
|
||||||
@ -76,13 +80,14 @@ class Module extends \humhub\components\Module
|
|||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function getNotifications()
|
public function getNotifications()
|
||||||
{
|
{
|
||||||
if(Yii::$app->user->isAdmin()) {
|
if (Yii::$app->user->isAdmin()) {
|
||||||
return [
|
return [
|
||||||
'humhub\modules\admin\notifications\NewVersionAvailable'
|
'humhub\modules\admin\notifications\NewVersionAvailable'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user