-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use migrations for RBAC tables #2913
Comments
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 |
* 'master' of github.com:yiisoft/yii2: (43 commits) `BaseActiveRecord::findAll()` comment fix Fixes #2913: RBAC `DbManager` is now initialized via migration [NL] Removed app.php [NL] brought translations up to date Fix for comparing numeric attributes in JavaScript Better Gii caption english Fix for comparing numeric attributes in JavaScript HHVM compatibility Fixes for Yii 2 Console Application Rough creation of a doc style guide typo Finished Edits Edited up to Active Record renamed chapter to section [skip ci] Catalan translation Edited up through "I18N" Cleaned Up updated guide toc [skip ci] Update concept-behaviors.md Fixed wrong links [skip ci] Fixed document for multisort in BaseArrayHelper ...
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 |
sorry ... I launched yii migrate --migrationPath=vendor/yiisoft/yii2/rbac/migrations |
After executing yii rbac/init I get this error Error: Unknown command "rbac/init"!!!!!!!! any help? |
@EvansonBarasa Could you show us your output of |
there is no |
@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.
The text was updated successfully, but these errors were encountered: