Skip to content
Simple permission management based on PHP classes and roles
Branch: v1.0-dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DependencyInjection
Resources/config/services
Voter
.gitignore
CleverAgePermissionBundle.php
LICENSE
README.md
composer.json

README.md

CleverAge/PermissionBundle Documentation

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]
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.