Users are Confused about Yii2 RBAC DBMANAGER

This artical is an initial draft; I will refine the thoughts below as I go on living.

Intro

The purpose of this discussion is to help the Yii community better onboard newbs.

For example, the seemingly simple task of configuring RBAC with dbManager is maybe a 15min task for a vet, a newb it is weeks if they hit a small snag.

The Issue

A newbie is easily hung up on components, modules and the config file in general. The Yii website guides or wiki articles I find are given step by step but with no here is why explanation.

[indent]

Example

Yii2 RBAC Wiki Article

In the above link, the "as access" config array is stumping many newbs, and when I stepped back I can understand why.

[/indent]

The Questions Needing Answers

  • Why do I have to use the verbiage "as access" instead of "whatever"?

  • Where is a complete listing of components, modules that can be configured?

  • Where are the roadmaps for small, medium and large scale projects housing one or many sub applications?

Suggestions

One observation, I attempted to improve a wiki article but was denied access for being too new. The inability to quickly develop an article I think is doing more harm than good. Don’t we want to rapidly improve articles, which will also help grow the community? I understand the down sides of having something too open, but that is why we have moderators and volunteers like StackOverflow does.

“as access” is actually behavior ‘access’

True, but "as" is the critical keyword, the access part could be called anything.

For example: ‘as bunny’ instead of 'as access’s would work.

I re-read it 5 times and can’t find where it says ‘as access’. I used this wiki as a guide to setting up my RBAC and I don’t have that in my application either.

http://www.yiiframework.com/doc-2.0/guide-concept-behaviors.html#attaching-behaviors

It is simple behavior, defined in config file

I was talking about the link to the wiki article, I guess I am missing something.

To answer our question:

http://www.yiiframework.com/doc-2.0/guide-concept-configurations.html#configuration-format

But, yes: the "as something" is nowhere to be found in that linked to wiki article. And it has never been there (judging by the history of the page).

Referring to the setup with //github.com/mdmsoft/yii2-admin. I should have clarified, the yii2-admin by mdmsoft quickly allows you to get up and going. However, people placed some tutorials out there with some mistakes that misguided users where to place the behavior class. I.e. people were placing the ‘as access’ behavior which declared the class for access control in the components section. Because I could not edit the article, I could not fix the documentation error.


    'as access' => [

        'class' => 'mdm\admin\components\AccessControl',

        'allowActions' => [

            'site/*',       // Leave for guest access.

        ]

    ],

You have behavior "access" example in mention link http://www.yiiframework.com/wiki/771/rbac-super-simple-with-admin-and-user/ under Step 6.

So when you have example of behavior access, it is easy to implement to config file as "as access"

Gothcha, thanks for the clarification.