FsPages laisse la place à Gitlab Pages ! Voici la documentation pour vous en servir : https://docs.gitlab.com/ce/user/project/pages/index.html

Public
Snippet $387 authored by Denis Chenu

Restric admin

beforeControllerActionExample.php
Raw
    public function beforeControllerAction()
    {
        if(Yii::app() instanceof CConsoleApplication) {
            return;
        }
        if($this->event->get('controller')=='admin'){
            $haveAccess=false; // Replace by your own test
            if(!$haveAccess){
                throw new CHttpException(401,"No access");
            }
        }
    }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!