andersundsehr / group_access
允许通过前端用户组限制extbase动作
1.0.3
2023-02-06 09:39 UTC
Requires
- php: ~8.1 || ~8.2
- typo3/cms-core: ^11.5 || ^12.0
Requires (Dev)
- phpstan/extension-installer: *
- pluswerk/grumphp-config: ^6
- saschaegerer/phpstan-typo3: *
- ssch/typo3-rector: ^1.1.3
- typo3/cms-extbase: ^11.5 || ^12.0
This package is auto-updated.
Last update: 2024-08-24 22:33:22 UTC
README
安装
composer req andersundsehr/group_access:^1
使用
<?php #[GroupAccess([2, 6])] class CustomerController extends ActionController { public function overviewAction(): ResponseInterface { //this action is only accessible if the Frontend User has group 2 or 6 } #[GroupAccess([7])] public function listAction(): ResponseInterface { //this action is only accessible if the Frontend User has group (2 or 6) and 7 } }
<?php class ProjectController extends ActionController { public function overviewAction(): ResponseInterface { //this action is only accessible for all users and without user login } #[GroupAccess([7, 9, 12])] public function listAction(): ResponseInterface { //this action is only accessible if the Frontend User has group 7 or 9 or 12 } #[GroupAccess([3])] #[GroupAccess([5])] public function listAction(): ResponseInterface { //this action is only accessible if the Frontend User has group 3 and 5 } }
来自anders und sehr GmbH的热爱
如果某些事情没有工作 😮
或者你欣赏这个扩展 🥰,请告诉我们。