cleverage / permission-bundle
Simple permissions based on roles against any PHP object, class or any string
Installs: 15 065
Dependents: 1
Suggesters: 1
Security: 0
Stars: 2
Watchers: 5
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- symfony/config: >=3.0
- symfony/dependency-injection: >=3.0
- symfony/form: >=3.0
- symfony/http-kernel: >=3.0
- symfony/options-resolver: >=3.0
- symfony/security-core: >=3.0
README
This bundle allows you to define role-based permissions for any PHP class. The classic use-case is for Doctrine entities.
Quick example
Roles are just meant as an example, there is no hard-coded role in this bundle.
clever_age_permission: classes: App\Entity\Article: permissions: # list: ~ # Don't define a permission: means granted for all create: [] # Defined but left empty: deny access for all edit: [ROLE_SUPER_ADMIN] # Only allows super admins to edit delete: [ROLE_DATA_ADMIN]