Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does superuser mean in the rights-extension of Yii?

I am using the rights extension of Yii and get this error:

There must be at least one superuser!

I don't know what this superuser means since I am using the default authentication with user admin and demo. After reading the documentation of rights extension, I tried to configure rights with:

'rights'=>array(
    'superuserName'=>'admin',
    'install'=>true
),

But it doesn't work, I have searched the internet but got no result.

like image 912
jerry_sjtu Avatar asked Nov 26 '25 11:11

jerry_sjtu


1 Answers

you need to connect the user table with a table AuthAssignment, whose name has been declared in the array setting

'modules'=>array(
'rights'=>array(
    'superuserName'=>'admin',
     ),
 ),

then, you have to change the table AuthAssignment userid field that refer to field id on table user

like image 192
masbenx Avatar answered Nov 28 '25 00:11

masbenx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!