This is a symfony bundle for using NetBrothers Access Control Center (ACC).
The ACC offers you a way to handle permissions based on roles and routes. This bundle communicates with your ACC-instance and synchronizes your defined permissions into your project.
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Open a command console, enter your project directory and execute:
composer require netbrothers-gmbh/version-bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require netbrothers-gmbh/version-bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php
return [
// ...
NetBrothers\VersionBundle\NetBrothersVersionBundle::class => ['all' => true],
];
You have to set up the bundle:
-
Copy
installation/config/packages/netbrothers_syncacc.yaml
to symfony's config path. -
Set the credentials either in
.env
-file ornetbrothers_syncacc.yaml
:
.env |
netbrothers_syncacc.yaml |
Description |
---|---|---|
ACC_ENABLE | acc_enable | enable acc |
ACC_SERVER | acc_server | Url ACC-Server |
ACC_SOFTWARE_TOKEN | acc_software_token | SoftwareToken |
ACC_SERVER_TOKEN | acc_server_token | Server-Token |
ACC_USE_BASIC_AUTH | acc_use_basic_auth | enable Authentication Basic-Auth |
ACC_BASIC_AUTH_USER | acc_basic_auth_user | Username Basic-Auth |
ACC_BASIC_AUTH_PASSWORD | acc_basic_auth_password | Password Basic-Auth |
-
Clear symfony's cache.
-
Create tables by migration.
- Open a command console, enter your project directory and execute the following command:
php bin/console netbrothers:acc
You can specify some options:
option | meaning |
---|---|
all (default) | get roles and acl |
roles | get roles |
acl | get acls |
CAUTION: Option acl
only works, if table acl_role is filled.
Stefan Wessel, NetBrothers GmbH
MIT