PHPackages                             ybenhssaien/authorization-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ybenhssaien/authorization-bundle

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ybenhssaien/authorization-bundle
================================

Symfony bundle to authorize entities properties

v1.0(5y ago)04MITPHPPHP &gt;=7.4

Since Jul 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ybenhssaien/authorization-bundle)[ Packagist](https://packagist.org/packages/ybenhssaien/authorization-bundle)[ RSS](/packages/ybenhssaien-authorization-bundle/feed)WikiDiscussions 1.0 Synced 2d ago

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

The AuthorizationBundle
=======================

[](#the-authorizationbundle)

The AuthorizationBundle manage authorizations on properties of an entity, they can be either readable or writable or both by some roles and not others, every property of an entity can be authorized or not for reading or writing using [isGranted()](https://github.com/symfony/symfony/blob/5.1/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php) in PHP files or Twig version [is\_granted()](https://symfony.com/doc/current/security.html#access-control-in-templates).

Installation
------------

[](#installation)

1. Install with composer : ```
    composer require ybenhssaien/authorization-bundle
    ```
2. Enable it in `config/bundles.php` : ```
    return [
       ......
       Ybenhssaien\AuthorizationBundle\AuthorizationBundle::class => ['all' => true],
    ];
    ```

Example
-------

[](#example)

- Declaration of properties :

```
