foowie/permission-checker
最新稳定版本:0.5.3
Composer 安装命令:
composer require foowie/permission-checker
包简介
Access permission check & latte macros
README 文档
README
Installation
Include extension in config.neon
extensions:
permission: Foowie\PermissionChecker\DI\PermissionExtension
and use PresenterPermissionTrait in your base presenter.
Usage
You can annotate presenter class, action and render methods and signal methods with these annotations:
@loggedIn - logged user is required
@loggedIn(false) - unlogged user is required
@role(superadmin, admin) - user must have role admin or superadmin
@resource(administration) - user must be assigned to administration resource
In template files is allowed to user these macros:
{ifAllowed 'administration'}{/ifAllowed} - user must be assigned to administration resource
{ifAllowedLink ':Administration:Dashboard:'}{/ifAllowed} - user must be allowed to display that page
<a n:ifAllowedHref=':Administration:Dashboard:'></a> - user must be allowed to display that page, shorter alternative is "allowedHref"
统计信息
- 总下载量: 17.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-06-16