SESSION

The following table lists session variables that can be used without explicit declaration.

Variable Type Value
SESSION/DATE date Current date.
SESSION/USER_ID string User ID of current user.
SESSION/USER_ROLES array Roles this user belongs to.
SESSION/ORGANIZATION_NAME string Organization Name.
SESSION/ORGANIZATION_TYPE string Organization type.
SESSION/ORGANIZATIONID number Organization identification number
SESSION/TIMESTAMP timestamp Date and Time
SESSION/ENTERPRISE_NAME string Enterprise Name.
SESSION/ENTERPRISE_INTERNAL_NAME string Enterprise Internal Name.
SESSION/LANGUAGE string User profile's language locale value.
SESSION/COUNTRY string User profile's country locale value.
SESSION/LANGSEL string Language locale selected from Login page.

The following example shows an access rule which restricts access to the attribute “SENSITIVE_ATTRIBUTE” only to Admin users. Notice that “in” has to be used, because a user can belong to more than 1 role, and USER_ROLES therefore returns an array of values.

<constraint>
		<name>HideSensitiveAttribute</name>
		<description>Only Admin Role can see Sensitive Attribute</description>
		<condition>
			<in>
				<const type="string">Admin</const>
				<var>SESSION/USER_ROLES</var>
			</in>
		</condition>
		<action>
			<access mode="modify">SENSITIVE_ATTRIBUTE</access>
		</action>
		<action>
			<access mode="hide">SENSITIVE_ATTRIBUTE</access>
		</action>
</constraint>

The following example shows usage of SESSION/LANGUAGE, SESSION/COUNTRY and SESSION/LANGSEL.

<constraint>
<name>Set Language</name>
<description>Get Lanaguage from SESSION.</description>
<action>
<assign>
<var>language</var>
<var>SESSION/LANGUAGE</var>
</assign>
</action>
</constraint>
<constraint>
<name>Set Country</name>
<description>Get Country from SESSION.</description>
<action>
<assign>
<var>country</var>
<var>SESSION/COUNTRY</var>
</assign>
</action>
</constraint>
<constraint>
<name>Set Language Sel</name>
<description>Get ui language selected SESSION.</description>
<action>
<assign>
<var>uilang</var>
<var>SESSION/LANGSEL</var>
</assign>
</action>
</constraint>
Note: After selecting language and country in User Accounts screen, the MDM administrator has to logout and login as the user for whom the language and country selection is done. Otherwise these settings are persisted through the current session.