Wiki articles tagged with "accessRules"

Showing 1-2 of 2 items.

Simple access control

Created 13 years ago by szfjozsef szfjozsef, updated 13 years ago by szfjozsef szfjozsef.

For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

3 7
10 followers
Viewed: 47 927 times
Version: 1.1
Category: Tutorials

Configuring controller access rules to default-deny

Created 14 years ago by Steve Friedl Steve Friedl, updated 11 years ago by nsanden nsanden.

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12 followers
Viewed: 141 719 times
Version: 1.1
Category: How-tos