You're currently browsing the Ignition 8.0 docs. Click here to view the latest docs.

The following feature is new in Ignition version 8.0.2
Click here to check out the other new features
This function is used by Ignition's Expression language.

Description
 Returns a qualified value with a boolean value which is true if the user in the current session is authorized, false otherwise.
Syntax

 isAuthorized(isAllOf, securityLevel[, securityLevelN...])

  • Parameters

boolean isAllOf - True if the current user must have all of the given security levels to be authorized, false if the current user must have at least one of the given security levels to be authorized

string securityLevels - One or more String paths to a security level node in the form "Path/To/Node". Each level in the tree is delimited by a forward slash character. Additional security level paths are simply added to the end of the parameter list. The Public node is never a part of the path.

  • Results

Bool - Returns a qualified value with a boolean value which is true if the user in the current session is authorized, false otherwise. The quality of the qualified value is the worst of the qualities of all the qualified values of each argument.

Examples
Code Snippet
// returns true if the current user has both Administrator and Baz roles
// returns false if they have only one or if they have neither
isAuthorized(true, 'Authenticated/Roles/Administrator', 'Foo/Bar/Baz')
  • No labels