Toma
(Pr Toma)
June 2, 2012, 1:13pm
1
Hello.
So im am following this Guide: http://www.yiiframework.com/wiki/65/how-to-setup-rbac-with-a-php-file/
At the end when i try to login, with a normal user with a role of reader or an admin with the role of admin. I get the same error : Unknown authorization item "admin". (or reader ,depends on the user).
Anyone got an idea?
Toma
(Pr Toma)
June 2, 2012, 1:51pm
2
Ahh fixed the error. The auth.php file should be in the protected/data folder. Still have a problem thought.
I try to test the reader role. Like this:
<?php if(Yii::app()->user->checkAccess('reader')): ?>
<h1> Grats u are a reader </h1>
<?php endif; ?>
This should appear after i log in, but it wont. Any idea?
Toma
(Pr Toma)
June 2, 2012, 3:26pm
3
fixed. Thx to tom[] on live chat. Just needed a litle debugging.