Symfony/sfDoctrineGuard Conditional Permissions
问题 I'm contemplating the best way to implement the conditional permissions i.e. Users and Teams are m-to-m. But each Team also has a 1-to-m "Leader" relationship with the User table as well. For simplicity sake, let's say we have two permission levels, "User" and "Admin". Then lets say, only certain Team administration task i.e. group emails, can only be sent by that team's leader. At the moment, every action that is specific to team leaders queries the database to check it the current user is