This service checks for a specified privilege by name.


Argument Type Description
auth (optional) Auth The Auth type supplies credentials and optionally, a host name for licensing. The userId and password can be specified with HTTP BASIC or WS-SECURITY instead.
privilegeName (required) string name of the privilege (for example, "TS_USRSYSPRIV_APIACCESS")
objectId (optional) string The ID of the object to check privileges against.
user UserIdentifier The user to check privileges against.
options Options Holds name value pairing for future arguments.


A boolean is returned, showing whether the user has the privilege (true) or not (false). The privilege is checked in the context of either the calling user or the specified user. For example:



You can call GetUserPrivileges for the administrator account or for a user account (assuming it has all privileges) to return the name of every privilege. You can then use these privilege names in the HasUserPrivilege call to determine if other users have the same privilege.

The objectId argument is used to limit the privilege check to a certain database object. For example, if want to query a table privilege, you specify the table ID of the table. If want to query a project privilege, you specify the project ID. To check for system privileges, send an empty objectID argument. If the object ID is not composed of all numeric digits, the ID is interpreted as the UUID for the object.



The following XML is a snippet of the payload this is sent with HasUserPrivilege.