Hi!
I wonder if there is a simple way to add users to rule. I have a new partner and I only want to show some of the information available.
I have the classic predefined 2 users in User.php like:
private static $users = [
        '100' => [
            'id' => '100',
            'username' => 'admin',
            'password' => 'xxx',
            'authKey' => 'test100key',
            'accessToken' => '100-token',
        ],
        '101' => [
            'id' => '101',
            'username' => 'sarah',
            'password' => 'xxx',
            'authKey' => 'test101key',
            'accessToken' => '101-token',
        ],
    ];
And in my SiteController for now I have like this:
public function behaviors()
    {
        return [
            'access' => [
                'class' => AccessControl::className(),
                'except' => ['statistics', 'login', 'logout', 'spam', ...],
                'rules' => [
                    ['allow' => true, 'roles' => ['@']],
                ],
            ],
            'verbs' => [
                'class' => VerbFilter::class,
                'actions' => [
                    'logout' => ['post'],
                ],
            ],
        ];
    }
I want the user sarah only view school and contact tables. I only know that I have to modify something in SchoolController and ContactController.