A
A
Alexander N++2015-11-02 13:30:22
Yii
Alexander N++, 2015-11-02 13:30:22

Is it possible to give Yii2 RBAC permission to a user separately?

Actually, you can give a separate Permissions without being tied to a role, the user can.
Is it correct?
And that this one is mixed will function normally when checking
Yii::$app->user->can('TEST')
Why I ask, since the getPermissionsByUser method from the \yii\rbac\DbManager class does not see permissions that are not tied to a role.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
maxxi165, 2015-11-13
@maxxi165

According to the RBAC ideology, only roles can be assigned to a user. Permissions can only be tied to roles. Accordingly, the user's permissions are checked only through roles.
That's what it says in the Yii doc.
dock

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question