https://github.com/geo6/laminas-acl-postgresql
Zend Permissions ACL with PostgreSQL
https://github.com/geo6/laminas-acl-postgresql
laminas laminas-acl laminas-permissions-acl php postgresql zend zend-acl zend-framework zend-permissions-acl
Last synced: 27 days ago
JSON representation
Zend Permissions ACL with PostgreSQL
- Host: GitHub
- URL: https://github.com/geo6/laminas-acl-postgresql
- Owner: geo6
- License: gpl-3.0
- Created: 2017-12-20T12:30:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T02:27:26.000Z (about 4 years ago)
- Last Synced: 2024-11-17T10:24:46.972Z (6 months ago)
- Topics: laminas, laminas-acl, laminas-permissions-acl, php, postgresql, zend, zend-acl, zend-framework, zend-permissions-acl
- Language: PHP
- Homepage:
- Size: 160 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Laminas Permissions ACL](https://docs.laminas.dev/laminas-permissions-acl/) with [PostgreSQL](https://www.postgresql.org/)
[](https://packagist.org/packages/geo6/laminas-acl-postgresql)
[](https://packagist.org/packages/geo6/laminas-acl-postgresql)
[](https://packagist.org/packages/geo6/laminas-acl-postgresql)## Install
composer require geo6/laminas-acl-postgresql
## Database structure
See [INSTALL.md](./INSTALL.md)
> For the purposes of this documentation:
>
> - a **resource** is an object to which access is controlled.
> - a **role** is an object that may request access to a **resource**.
>
> Put simply, **roles request access to resources**. For example, if a parking attendant requests access to a car, then the parking attendant is the requesting role, and the car is the resource, since access to the car may not be granted to everyone.
>
> ---### Table `resource`
| Column name | Column description |
| ----------- | ----------------------------------------------------------------------------- |
| id | `int` Identifier (AUTONUM) |
| name | Name of the resource |
| url | URL of the resource |
| locked | `bool` Allows to deny access to the resource for everyone |
| public | `bool` Allows to set the resource accessible to everyone - even without login |### Table `role`
| Column name | Column description |
| ----------- | ----------------------------------------------------------------------------- |
| id | `int` Identifier (AUTONUM) |
| name | Name of the role |
| priority | `int` Priority of the resource - Rules will be applied following the priority |A "special" role is created by default : `admin` !
This role will have automatically access to every new resource created.### Table `user`
| Column name | Column description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| id | `int` Identifier (AUTONUM) |
| login | Login of the user (= username) |
| password | Encrypted password of the user |
| email | Email address of the user |
| fullname | Full name of the user |
| home | `int` Identifier resource used to be the homepage of the user. The user will be automatically redirected to his/her homepage once logged in. |
| locked | `bool` Allows to deny access to everything for this user. The user won't be able to log in. |### Table `role_resource`
Grant access for a role to a resource.
### Table `user_role`
Assign a user to a role.