I
I
Insignit2014-07-03 22:48:17
MySQL
Insignit, 2014-07-03 22:48:17

How to create permissions for controllers in Yii framework?

There are 5 tables:
9de5d9d319084187b35abe0d5bdea92f.jpg
Authorization on the site is already implemented. Users (user) can have many workgroups
(workspace)
Each group has many clients
where each client contains many projects
only the user who is in the group that the client belongs to.
And the same question for projects.
How is this done optimally in the Yii framework?
I think there should be a solution through accessRules() ? to immediately restrict access to certain actions.
Thanks for any solution!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dima Barsukov, 2014-07-04
@mrsombre

If this is the first Yii, then read about Rbac and the use of Business rules. I think this is your case.

I
Insignit, 2014-07-04
@Insignit

Yes, this is the first application in Yii, but as I understand it, Rbac and Business rules are exactly what I'm talking about the accessRules () function? it would be interesting to hear how to connect it theoretically with this database structure.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question