Skip to content

Action – getPermissions

Eric Domke edited this page May 6, 2019 · 1 revision

Get whether the current user has certain permissions

AML Query

<!-- SOAP_ACTION = GetPermissionsForClient or ApplyItem -->
<AML>
  <Item access_type="{Permission to check for 
       (e.g. 'can_add', 'can_update', 'can_get', 'can_delete', etc.)}"
    action="getPermissions"
    id="{ID of the item to check}"
    type="{Type of the item to check}" />
</AML>

Notes

  • The value returned is a simple 0 or 1 indicating if the user has the permission.
  • In order to check for the can_add permission, the ID and type must refer to an ItemType item.
  • A pipe-delimited list can be specified (e.g. can_update|can_delete). In this case, a value of 1 indicates that all of the permissions are available. Else, a value of 0 is returned.

Example (Input):

<AML>
  <Item access_type="can_get"
    action="getPermissions"
    id="904737F51C7644B8B64C167B08B36BB5"
    type="Grid"></Item>
</AML>

Example (Result):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <ApplyItemResponse>
      <Result>1</Result>
    </ApplyItemResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Clone this wiki locally