Start page / Template development / Rules / Comparative expressions / <IN_GROUP/>

<IN_GROUP/>: Validation by group membership

The <IN_GROUP/> tag can be set in the value determination area of the rule definition (or for the definition of a precondition) and checks whether the editor who requested the form is (TRUE) or is not (FALSE) a member of the specified group.

The <IN_GROUP/> tag can be used, for instance, to suppress the viewing or editing of individual form elements by particular user groups even if they have the relevant permissions to view or edit the entire form.

Important Using rules to display and hide form elements is not a security model for protecting data and content from unauthorized access. The rules only serve to make forms easier to read and assist in editorial work.

"name" attribute

The group can be defined using the “name” attribute in the tag:

<IN_GROUP name="Editors"/>

Example

Displaying input components depending on the editorial group

The following example only displays the “#form.group_editors” input component in the form if the editor who opens the form is a member of the “editors” editor group. The input component is hidden to all other editor groups, regardless of whether or not they have the required editorial permissions (e.g., the “visible” permission) for this form. Since the FirstSpirit framework does not provide any color coding to identify this at the INFO restriction level and the rule developer has not defined any correction notes in the rule, an editor who is not a member of the defined group will not notice any difference when performing editorial work:

<RULES>
<RULE>
<WITH>
<IN_GROUP name="editors"/>
</WITH>
<DO>
<PROPERTY source="#form.group_editors" name="VISIBLE"/>
</DO>
</RULE>
</RULES>

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy