Symfony Voters 仅用于检查用户权限?

Symfony Voters only for checking user permission?

Symfony Voters (Documentation) 用于检查实体的用户权限(通常):

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

如果我想控制模块的权限(对于用户),Symfony Voters 是否适用?示例:如果模块有效(validated = 数据库上为真),则无法编辑模块?

总而言之,投票者是专门与用户绑定的,还是他们可以扮演更普遍的角色?

选民会做任何你"tell"他们做的事。为方便起见,他们接收用户作为参数,但您没有义务使用它。