0

Symfony Voters (Documentation) is for checking user permission for an entity (usually) :

Security voters are the most granular way of checking permissions (e.g. "can this specific user edit the given item?")

Sut if I want to control the permissions on a module (for a user), the Symfony Voters are they adapted ? Example : can't edit module if module is valitated (validated = true on database) ?

In summary, are voters exclusively tied to users or can they then play a more general role ?

Gaylord.P
  • 1,539
  • 2
  • 24
  • 54

1 Answers1

0

Voters will do anything you "tell" them to. For convenience they receive the user as parameter, but you are not obliged to use it.

Mike Doe
  • 16,349
  • 11
  • 65
  • 88