-
-
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
Implement RBAC #24
Comments
I think that storing PHP code processed with eval should be avoided (CdbAuthManager). That's not good for security. Any code injection could cause serious damages, not only to the app. Eval could run injected code that could harm the whole server. Even php.net warns about evals and recommands not to use it. Something nice would be to store a relation between the user table, the authitem table and any other table of the app corresponding to a model. |
bizrules may be anonymous php functions stored in a config file like it is done with CPhpAuthManager. |
@cebe what if backend isn't a PHP file? |
The idea could be to put the code of the bizrule in the method of a class. |
Could adding behaviors to the AuthManager service be an option? The bizrule on an item should then contain the name of a bizrule. This bizrule name should be a method of the AuthManager service (a method of the AuthManager class or a method of a behavior added to the AuthManager service). |
@samdark you can store anonymous functions in a file and refer to them from db backend by name which may be the array key. |
@qiangxue You working on this already or not yet? |
Nope. Only issues labelled as "under development" are being worked on. |
@qiangxue I'm starting working on this. ETA: up to week, maybe less. |
Cool. Would be great if you could check whether there are other enhancement requests in our forum and take this chance to improve RBAC. |
@qiangxue I'll implement base version at start, than check forum for possible improvements. |
Done for preview. |
@qiangxue Where we should put needed *.sql files? Under yii/rbac directory ? |
|
The database should be created via migrations in the end. A simple |
Do we want to force people to use migrations? |
@cebe I'm sure NOT. |
May I create a PR with a migration, which executes the SQL files according to the used DB-connection? |
No description provided.
The text was updated successfully, but these errors were encountered: