PHPackages                             ccvf2s/access-manager - 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. ccvf2s/access-manager

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

ccvf2s/access-manager
=====================

Helper for managing the roles of users permissions

1.0.2(7y ago)02MITPHPPHP ^7.1

Since Feb 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ccvf2s/access-manager)[ Packagist](https://packagist.org/packages/ccvf2s/access-manager)[ RSS](/packages/ccvf2s-access-manager/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

PHP Basic access management with permissions
============================================

[](#php-basic-access-management-with-permissions)

Requirements
------------

[](#requirements)

- php &gt;= 7.1
- composer

Main goal
---------

[](#main-goal)

The goal of this library is to give the ability to manage in simple way the access level of an user based on the list of permissions she/he has.

How to setup
------------

[](#how-to-setup)

```
composer require "ccvf2s/access-manager:^1.0"

```

How to use it
-------------

[](#how-to-use-it)

It will be good to use a Dependency injection Library, but if you cannot feel free to create a new instance of `DefaultDecisionManager`.

But before to do that, you need to implement the `Ccvf2s\AccessManager\Domain\User\UserProvider` interface. This will give to the library the ability to retrieve your user based on the id passed in `findUser`.

Example:

```
