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.


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

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

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