srbac checkAccess


I have a problem if it’s still a problem.

When I configure my url parameters to by lower case and srbac inserts actions in case sensitive way, for example, itemRegisterAdmin

So if I check that my url must by lower case, than Yii::base function checkAccess has lower cased action itemregisteradmin and selects from database srbac saved action itemRegisterAdmin, than it compares and the rezult is ‘itemregisteradmin’ === ‘itemRegisterAdmin’ and checkAccess function returns false.

So in this way I suggest to rewrite checkAcces function in secont Yii realize and for solving this problem, it can be rewriten in srbac module.

Which are the steps to duplicate this issue?

Could you put a echo $access; on line 40 of SBaseController and see the name of the action to checkAccess?

Is it lowercase?

Yes, it’s lower cased but action value taken from srbac one of tables is case sensitive ‘itemsControllerAdmin’.

So, the aplication returns lower case string and checks with srbac table values wich are case sensitive.

As I see, You fixed this one in new srbac realize :

"If checking db fails , check for lower-upper case issues and display a message"

I’ll check this one realize. :)

No this, is for checking authmanager table names

I can’t duplicate this.

Could you provide the name of the controller and the name of the action function?