Skip to content

Commit 3b7d692

Browse files
author
Jurian Sluiman
committed
Write ACL/RBAC docs
1 parent dcec0d2 commit 3b7d692

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/4.Authorization.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
# Authorization
2+
ZfcAdmin allows authorization via [BjyAuthorize](https://github.com/bjyoungblood/BjyAuthorize) or [ZfcRbac](https://github.com/ZF-Commons/ZfcRbac). Configuration for both modules is provided to easily configure ZfcAdmin. Authorization enables you to restrict access to `/admin` and every other page under ZfcAdmin.
23

3-
Restrict access to unauthorized Users.
4+
## BjyAuthorize authorization
5+
BjyAuthorize works with `Zend\Permission\Acl` as access restriction component. The BjyAuthorize module combines `Zend\Permission\Acl` with the standard user module [ZfcUser](https://github/com/ZF-Commons/ZfcUser). To enable access restriction with BjyAuthorize, install the module and enable it in your `application.config.php`.
46

5-
### Solution
7+
Furthermore, ZfcAdmin has a `zfcadmin.global.php` file in the [config](../config/) directory. Copy this file over to your `config/autoload` directory. It directly provides BjyAuthorize configuration to restrict access to users for the `/admin` route. Only users in the "admin" group are allowed to access ZfcAdmin's pages.
68

7-
1. Install BjyAuthorize and enable in you application.config.php
8-
2. Import data/data.sql into your database.
9-
3. Create a user with ZfcUser and set the user_id and role_id in the database
10-
(e.g. user_id = 1, role_id = admin)
9+
Instructions for further configuration of BjyAuthorize are provided in the [repository of BjyAuthorize](https://github.com/bjyoungblood/BjyAuthorize).
1110

11+
## ZfcRbac authorization
12+
ZfcRbac works with `Zend\Permission\Rbac` as access restriction component. The ZfcRbac module combines `Zend\Permission\Rbac` with the standard user module [ZfcUser](https://github/com/ZF-Commons/ZfcUser). To enable access restriction with ZfcRbac, install the module and enable it in your `application.config.php`.
13+
14+
Furthermore, ZfcAdmin has a `zfcadmin.global.php` file in the [config](../config/) directory. Copy this file over to your `config/autoload` directory. It directly provides ZfcRbac configuration to restrict access to users for the `/admin` route. Only users in the "admin" group are allowed to access ZfcAdmin's pages.
15+
16+
Instructions for further configuration of ZfcRbac are provided in the [repository of ZfcRbac](https://github.com/ZF-Commons/ZfcRbac).
1217

1318
## Link to documentation pages
1419

0 commit comments

Comments
 (0)