krausv / permissions-panel
Bar with list of permissions
1.1
2016-02-20 17:05 UTC
Requires
- php: >=5.4.0
- tracy/tracy: ^2.3.0
Suggests
- nette/di: For automatic panel loading
This package is not auto-updated.
Last update: 2025-01-15 04:28:18 UTC
README
permission-panel is simple bar panel for Tracy. Permission-panel containt list of roles and resources of Nette\Security\Permission
Installation
$ composer require krausv/permissions-panel
Register permissions-panel in config.neon
extensions:
permissions-panel: Krausv\PermissionsPanel\Nette\DI\PermissionsPanelExtension(%debugMode%)
and register Nette\Security\Permission
services:
authorizator:
class: Nette\Security\Permission
setup:
- addRole('guest')
- addRole('admin')
- addResource('Users')
- addResource('Article')
- allow('admin', 'Article', 'view')
- allow('guest', 'Users', 'view')
- allow('guest', 'Users', 'delete')