staff_chk_perm

General Purpose

This service gets as input a staff user name, library, function, and subfunction and returns a Yes or No answer.

The service checks whether or not the staff user has permission to run the function with the subfunction in the library entered.

Input Parameters

1. STAFF_NAME – PICTURE X(10).

2. STAFF_PWD – PICTURE X(10).

3. FUNC_LIB – PICTURE X(5).

4. FUNC – PICTURE X(20).

5. SUB_FUNC – PICTURE X(20).

  • STAFF_NAME: The user name of the staff user (from the Z66 table) whose permissions are to be checked. Mandatory field.
  • STAFF_PWD: The password of the staff user whose permissions are to be checked.
  • FUNC_LIB: The library for which the staff user’s permissions are to be checked. Mandatory field.
  • FUNC: The name of the function for which the staff user’s permissions are to be checked.
  • SUB_FUNC: The name of the subfunction for which the staff user’s permissions are to be checked.

The func field can be empty, in which case the service only verifies that the given staff user has at least one type of permission (at least one row in the Z67 table). If there is a row in the Z67 table for the defined staff user and library, and func = global, then the service returns Yes for all funcs entered. If there is a row in the Z67 table for the defined staff user, library, and func (or global function if it exists) and sub_func = global, then the service returns Yes for all sub_funcs entered.

Output XML Format

The output XML includes a Yes or No response.

Example:
To check whether the user STAFF has permissions to run the function WWW-X (X-Services) with the subfunction MAIN on the DTL01 library, enter the following URL:

http://ram7:8881/X?op=staff_chk_perm&STAFF_NAME=STAFF&STAFF_PWD=2D8LY&FUNC_LIB=DTL01&FUNC=WWW-X&SUB_FUNC=MAIN

If successful, the output XML includes:

<sds:staff-chk-perm xmlns:sds="http://com/exlibris/digitool/sds/xmlbeans">
  <allowed>Y</allowed>
  <session-id>C29KTD17Q4J643LSPYITYVNV1RNLXU9VRTPHCBEER6FNB4LTU2</session-id>
</sds:staff-chk-perm>

Possible Error Codes

1. If the staff_chk_perm X-Service is activated without staff_name or func_lib having been entered, the following message appears in the output XML:

<error>name and library are mandatory</error>