The hasRights operation checks whether a user has permissions to view, edit, and run workflows.

To check the rights that you have on a workflow, you must have permission to view that workflow. If you have only edit or run permission on a workflow, you cannot view what rights you have on this workflow, and hasRights returns False.

A Web service application can check those rights by calling the hasRights operation. In the following example, hasRights checks whether the user has the right to read the workflow.

hasRights(workflowId, username, password, 'r')

Type

Value

Description

String

workflowId

The ID of the workflow for which you are checking a user's rights.

String

username

Orchestrator user name.

String

password

Orchestrator password.

Int

rights

  • a: The administrator can change the rights of the object.

  • c: The user can edit the workflow.

  • I: The user can inspect the workflow schema and scripting.

  • r: The user can view the workflow (but not the schema or scripting).

  • x: The user can run the workflow.

Note:

User rights are not cumulative. To perform all possible tasks on a workflow, a user must have all of the rights.

Return Value

Returns the following values:

  • True if the user has the specified rights on the workflow.

  • False if the user does not have the specified rights on the workflow.

The hasRights operation returns an "Unable to find workflow" exception if the workflow does not exist or if the user calling hasRights does not have permission to view the workflow.