Skip to content

Commit

Permalink
Merge pull request #317 from humhub/fix/184-module-settings
Browse files Browse the repository at this point in the history
Improve container module settings
  • Loading branch information
luke- committed Mar 14, 2024
2 parents a692fca + ddc45f5 commit 82198ed
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions controllers/ContainerConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,22 @@

namespace humhub\modules\wiki\controllers;

use humhub\modules\admin\permissions\ManageSpaces;
use humhub\modules\content\components\ContentContainerController;
use humhub\modules\content\components\ContentContainerControllerAccess;
use humhub\modules\space\models\Space;
use humhub\modules\user\models\User;
use humhub\modules\wiki\models\DefaultSettings;
use humhub\modules\wiki\permissions\AdministerPages;
use Yii;

class ContainerConfigController extends ContentContainerController
{
/**
* @inheritdoc
*/
public function init()
{
parent::init();
}

/**
* @inheritdoc
*/
protected function getAccessRules()
{
return [
['permission' => [ManageSpaces::class, AdministerPages::class]]
];
return [[ContentContainerControllerAccess::RULE_USER_GROUP_ONLY => [Space::USERGROUP_ADMIN, User::USERGROUP_SELF]]];
}

public function actionIndex()
Expand Down

0 comments on commit 82198ed

Please sign in to comment.