[+FEATURE] Fluid (ViewHelpers): Backported ifAuthenticated & ifHasRole security ViewHelpers
you can now use <f:security.ifAuthenticated> and <f:security.ifHasRole role="foo"> in your Fluid templates to check whether an FE user is currently logged in / belongs to the specified usergroup. Note: if role is a numeric value the uid of the usergroup is compared, otherwise the title of the usergroup. to deal with BE users you can use the respective be.security.* view helpers Resolves #9143
Showing
- typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php 70 additions, 0 deletions...ses/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php
- typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php 108 additions, 0 deletions...d/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
- typo3/sysext/fluid/Classes/ViewHelpers/Security/IfAuthenticatedViewHelper.php 70 additions, 0 deletions...lasses/ViewHelpers/Security/IfAuthenticatedViewHelper.php
- typo3/sysext/fluid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php 99 additions, 0 deletions...luid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php 78 additions, 0 deletions...sts/Unit/ViewHelpers/Be/IfAuthenticatedViewHelperTest.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php 101 additions, 0 deletions...uid/Tests/Unit/ViewHelpers/Be/IfHasRoleViewHelperTest.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php 80 additions, 0 deletions...it/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
- typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php 96 additions, 0 deletions...sts/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
Please register or sign in to comment