Closed schmunk42 closed 10 years ago
Currently RBAC tables use tbl_ prefix, that is not always suitable. For example I usually use {{%...} format. Moreover, it could be two or more separated groups of RBAC tables in the single db (one for users in front-end and the second is for backend). So I think that if it would be migrations for RBAC,they have to use some kind of parameters to ask for correct table names
I run first migration (init) then rbac (with migrationPath=..... option) it return me "No new migration found. Your system is up-to-date !!" Why ?
Have you run yii migrate --migrationPath=@yii/rbac/migrations/
?
sorry ... I launched yii migrate --migrationPath=vendor/yiisoft/yii2/rbac/migrations
thanks for reply ;)
After executing yii rbac/init I get this error Error: Unknown command "rbac/init"!!!!!!!! any help?
@EvansonBarasa Could you show us your output of ./yii help
Here is a screen shoot of ./yii help
there is no ./yii rbac/init
command, where did you get that from?
@lynicidn You should create an issue there, I think.
@schmunk42 ok :D
@cebe yii rbac/init command from yii 2.0 definitive guide
@EvansonBarasa this command isn't built-in but the one you should create. Anyway, it's done multiple times w/o issues so it's unlikely that there's an issue with framework itself. If you still have trouble please use official 2.0 forum to get help: http://www.yiiframework.com/forum/index.php/forum/42-general-discussions-for-yii-20/
Would be nice if we could just run something like
./yii migrate/up --migrationPath @yii/rbac
To initialize the needed tables.
The docs should be updated accordingly: http://stuff.cebe.cc/yii2docs/guide-authorization.html#using-db-based-storage-for-rbac
Not of the highest priority, but Yii should use migrations IMHO.