S
S
Seintero2016-12-01 12:13:43
symfony
Seintero, 2016-12-01 12:13:43

How can you check the truth of the access, if they are stored in the database?

Good afternoon! The question is rather theoretical, because I can’t figure out the documentation in any way (perhaps it slips away due to problems with foreign languages). I need to organize the differentiation of access rights, not only by roles, but also by specific actions (VIEW, EDIT ...) of these roles.
In the documentation I often see the use of the ... ->isGranted('EDIT', $item) method. But all the examples that I find are aimed at the fact that the accesses are already indicated there in the config. Whether it is possible to apply something similar and to accesses which are pulled out from a DB? Maybe someone withered a link to an article or a small example, I would be very grateful!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Romanenko, 2016-12-01
@slimus

You need voters: symfony.com/doc/current/security/voters.html
Then just google:
stackoverflow.com/questions/13020648/how-to-store-...
https://www.reddit.com/ r/symfony/comments/2t8evg/d...
and so on

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question