Skip to main content
Skip table of contents

CheckSession: verify that the current session matches the permissions required for the current job

Tag: CheckSession

When an automation script uses functions that require certain privileges and rights, CheckSession allows to verify the credentials of the user session the script was launched from, and warn the user of potential access problems, or raise an error.

NB: this is only relevant in Job automation. Basic automation from XML files cannot be verified with CheckSession.


If Value is not supplied in the script, the values set in the job header are used.

Role privileges are always set in the script header, and are always verified with CheckSession.


XML
<CheckSession Value="WarningIfAdmin" Type="ERROR"/>

Tag Attributes

AttributesAttribute Value
ValueA semi-colon-separted combination of:
RequiredLogin
WarningIfAdmin
WarningIfAdminTech
WarningIfUltraAdminTech
TypeIf omitted or left blank (""), displays the warning message box,
If set to "Error", triggers an automation error.

Detailed Description

Upon analysis of the context (current session is active, admin, ultra admin), the job center opens a dialog to inform the user, who might cancel execution.

starting-execution-script


An RBAC session is considered an Ultra Admin.


RequiredLoginA session must be active for the job to execute

active-session-required-sapio365-login



WarningIfAdminWarns about possible missing permissions if you're logged in as an admin

warning-if-admin-need-permissions



WarningIfUltraAdminTechAn Admin session is recommended

Warning-If-Ultra-Admin-Tech


WarningIfAdminTechAn Ultra Admin session is recommended

Warning-If-Ultra-Admin-Tech

Example Script

XML
<ytriaAutomation Application="sapio365">
	<!-- logged in as admin: error -->
	<CheckSession Value="WarningIfAdmin" Type="ERROR"/>
	<ShowGroups/>
</ytriaAutomation>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.