title: Yii2 require all Controller and Action to login
body: <p>In my sitecontroller I write like this</p>
  
  <pre><code>    'access' =&gt; [
          'class' =&gt; AccessControl::className(),
          'rules' =&gt; [
              [
                  'actions' =&gt; ['login', 'error'],
                  'allow' =&gt; true,
              ],
              [
                  'actions' =&gt; ['logout', 'index' ,'call-back'], // add all actions to take guest to login page
                  'allow' =&gt; true,
                  'roles' =&gt; ['@'],
              ],
          ],
      ],
  </code></pre>
  
  <p>so If I go to index or call-back action,I'll redirected to login page.
  but I have to do it for all action to each controller.
  Could you tell me the best way to do it?</p>