Skip to content
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

"Undefined index: model" - rbac #29

Open
ChrisWeit opened this issue Oct 16, 2020 · 1 comment
Open

"Undefined index: model" - rbac #29

ChrisWeit opened this issue Oct 16, 2020 · 1 comment

Comments

@ChrisWeit
Copy link

I am using the pluto and comus module (sjaakp) and created a role "user". A user got the permission to create a comment and was able to update and delete his own comments. In theory.


The problem is that pluto's condition "isCreator" spits out in debug: "Undefined index: model"


I am happy about any help.
Thanks,

@ettolo
Copy link

ettolo commented Feb 24, 2021

Same issue here! registered is default role. It is supposed to edit his own profile so i added 'isCreator' condition to the role
Then in my controller:

           'access' => [
            'class' => \yii\filters\AccessControl::className(),
            'rules' => [
                [
                    'allow' => true,
                    'roles' => ['registered'],
                ],
            ]
        ]

And i i go to https://######/profile/view?id=1 (or any other action)
I get the 'Undefined index: model' in in /####/#####/vendor/sjaakp/yii2-pluto/rbac/CreatorRule.php line 28
It is supposed to add something to the controllers/models to use 'isCreator' condition?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants