.. This reStructured text file has been automatically generated, do not change. .. Source: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php :edit-on-github-link: https://github.com/TYPO3/typo3/edit/main/typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php :navigation-title: be.security.ifHasRole .. include:: /Includes.rst.txt .. _typo3-fluid-be-security-ifhasrole: ============================================================ Be.security.ifHasRole ViewHelper `` ============================================================ This ViewHelper implements an ifHasRole/else condition for backend users and backend groups. Role refers to backend user groups. The :html:`role` attribute can either be the title of a group, or the uid. Examples ======== Basic usage:: This is being shown in case the current BE user belongs to a BE usergroup (aka role) titled "Administrator" (case sensitive) Everything inside the :html:`` tag is being displayed if the logged in backend user belongs to the specified backend group. Using the usergroup uid as role identifier:: This is being shown in case the current BE user belongs to a BE usergroup (aka role) with the uid "1" Everything inside the :html:`` tag is being displayed if the logged in backend user belongs to the specified backend group. IfRole / then / else:: This is being shown in case you have the role. This is being displayed in case you do not have the role. Everything inside the :html:`` tag is displayed if the logged in backend user belongs to the specified backend group. Otherwise, everything inside the :html:`` tag is displayed. .. _typo3-fluid-be-security-ifhasrole_source: Source code =========== Go to the source code of this ViewHelper: `IfHasRoleViewHelper.php (GitHub) `__. .. _typo3-fluid-be-security-ifhasrole_arguments: Arguments ========= The following arguments are available for ``: .. confval-menu:: :display: table :type: :default: .. _typo3-fluid-be-security-ifhasrole-then_argument: .. confval:: then :name: typo3-fluid-be-security-ifhasrole-then :type: mixed :required: false Value to be returned if the condition if met. .. _typo3-fluid-be-security-ifhasrole-else_argument: .. confval:: else :name: typo3-fluid-be-security-ifhasrole-else :type: mixed :required: false Value to be returned if the condition if not met. .. _typo3-fluid-be-security-ifhasrole-role_argument: .. confval:: role :name: typo3-fluid-be-security-ifhasrole-role :type: string :required: false The usergroup (either the usergroup uid or its title).