yii2-usuario icon indicating copy to clipboard operation
yii2-usuario copied to clipboard

Authentication rule class yii\rbac\Rule can not be instantiated

Open MixMe opened this issue 6 years ago • 9 comments

What steps will reproduce the problem?

My backend config: Capture2

My Error: Capture

Why is happen ?

MixMe avatar Aug 30 '19 10:08 MixMe

@MixMe this problem still appears?

Have you migrate : ./yii migrate --migrationPath=@yii/rbac/migrations

demonking avatar Sep 04 '19 12:09 demonking

@demonking I have the same problem, all migrations are completed

mreuro avatar Sep 08 '19 20:09 mreuro

@mreuro can you provide your steps ?

demonking avatar Sep 08 '19 20:09 demonking

@demonking did everything according to this instruction https://yii2-usuario.readthedocs.io that's what I have in the config: Без имени

2424c7b4b0

mreuro avatar Sep 11 '19 20:09 mreuro

yii\rbac\Rules is a abstract class...

MixMe avatar Sep 12 '19 13:09 MixMe

@MixMe I know, not blind. The question is how to make this thing work and which class to use

mreuro avatar Sep 12 '19 17:09 mreuro

@MixMe I know, not blind. The question is how to make this thing work and which class to use

I have the same question, but it doesn't seem any help here :(

MixMe avatar Sep 17 '19 13:09 MixMe

@MixMe @mreuro I am very sorry for not being able to respond quickly. Workload is quite heavy for me these days.

  • if you use rbac don't set the administrators
  • if you wish to create rules, you must follow the yii2 guidelines: https://www.yiiframework.com/doc/guide/2.0/en/security-authorization#using-rules. That is, you have to create your own rule extending from the yii2\rbac\Rule, which is an abstract class, and then add that rule on the UI adding the new class including the namespace on the box.

tonydspaniard avatar Sep 17 '19 15:09 tonydspaniard

I too have the same same problem.

RosyStephen avatar Dec 10 '21 05:12 RosyStephen