Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何调试用户登录的角色?
我正在与前端用户一起在 Neos 中制作一个插件,并希望使用视图助手限制对某些操作的访问:
<f:security.ifHasRole role="Example.Something:User">
在控制器中,编写:
/** * @var \TYPO3\Flow\Security\Context * @Flow\Inject */ protected $securityContext; // In controller action $this->securityContext->getAccount()
在流体视图中:
<f:debug>{account.roles}</f:debug>