humhub-contrib / mostactiveusers

Adds a panel on the Dashboard, indicating the most active users
8 stars 7 forks source link

Make Listing private #11

Open 001101 opened 8 years ago

001101 commented 8 years ago

If you want to make your hub private, just for registered users (as it should be by default), then you can change the ACL behaviour

/protected/modules/mostactiveusers/controllers

from

  public function behaviors()
    {
        return [
            'acl' => [
                'class' => \humhub\components\behaviors\AccessControl::className(),
                'guestAllowedActions' => ['list']
            ]
        ];
    }

to

  public function behaviors()
    {
        return [
            'acl' => [
                'class' => \humhub\components\behaviors\AccessControl::className(),
                'loggedInOnly' => ['list']
            ]
        ];
    }

greets

001101 commented 7 years ago

If you are using the module 'mostactiveusers' you can also change the file

protected/modules/mostactiveusers/controllers/ListController.php

public function behaviors()
    {
        return [
            'acl' => [
                'class' => \humhub\components\behaviors\AccessControl::className(),
                'guestAllowedActions' => ['list']
            ]
        ];
    }

to

public function behaviors()
    {
        return [
            'acl' => [
                'class' => \humhub\components\behaviors\AccessControl::className(),
                'loggedInOnly' => ['']
            ]
        ];
    }