%GetAccessLevel function


Function
The function retrieves the access right level to specified object.
Declaration
INT %GetAccessLevel(
   HBJ in objectRef
   [, HBJ in accessingObjectRef]
 )

Parameters
objectRef Reference to object, you want to detect access rights to.
accessingObjectRef Reference to object of Process or User types - for which you detect the access rights to the object objectRef.

Description
The function retrieves the access rights of the object specified by the parameter accessingObejctRef to the object objectRef.

If the parameter accessingObjectRef is:
  • object of Process type - the function returns the access right of the process to the given object
     
  • object of User type - the function returns the access rights of the user to given object
     
  • not specified - there are retrieved:
    • the access rights of logged user if the script is running within active picture
    • the access rights of the process D2000 EventHandler (that one has the administrator rights) if the script is running within object of Event type

Return value

Return values are expressed by values of the predefined local variables:

  • _ACC_NONE - no access (0)
  • _ACC_READ - read level access (1)
  • _ACC_CONTROL - access to set value (control) (2)
  • _ACC_MODIFY - configuration access (3)

The values are increasing together with access rights.
If the access level is _ACC_CONTROL, then the access levels _ACC_READ is available automatically.
If the access is level _ACC_MODIFY, then the accesses levels _ACC_CONTROL and _ACC_READ are automatically available.


0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .