mootensai / yii2-enhanced-gii

Enhanced Yii2 Gii (generator) that generates related Models & CRUD
MIT License
203 stars 98 forks source link

Request: Add checkbox behaviour logged in user only. Standard code is below. #3

Closed arjenmeijer closed 9 years ago

arjenmeijer commented 9 years ago
public function behaviors()
{
   return [
        'verbs' => [
            'class' => VerbFilter::className(),
            'actions' => [
                'delete' => ['post'],
             ],
        ],
        'access' => [
            'class' => AccessControl::className(),
            'rules' => [
                [
                    'allow' => true,
                    'actions' => ['index', 'view', 'create', 'update','delete'],
                    'roles' => ['@']
                ],
                [
                    'allow' => false
                ]
            ]
        ]
    ];
}
mootensai commented 9 years ago

Hmm.. I'll think about it. I usually use yii2-rbac.. I don't really use ACL for authorization..

mootensai commented 9 years ago

Thanks @arjenmeijer !