Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The IsAvailableObject method is used to determine the current access rights to an object.

Method call syntaxSyntax for method invocation:

Code Block
function IsAvailableObject(compname: String, objtype: String, id: String, param : String) : String

The method returns 0 if the current user has not been assigned access rights of the param type param for to access the object; it . The method returns 1 if these rights have been assigned.

Method arguments:

  1. compname - is a required argument. Corresponds It corresponds to the name of the Computer object on the basis of which the object was created in the hardware tree.
  2. objtype - is a required argument. Corresponds It corresponds to the type of the system object access rights to which access rights are are being checked. Allowed you want to clarify. Possible values: String type; the set of values is restricted to the , range is limited by object types registered in the system.
  3. id - is a required argument. Corresponds It corresponds to the identification (registration) number of the object of the type specified by the objtype argument. Allowed Possible values: String type; the set of values is restricted to , range is limited by the identification numbers of objects of the specified type , which are registered in the system.
  4. param - is a required argument. Corresponds It corresponds to the number of the type of rights which are being checkedthat you want to find out if they exist. A description of rights is given inLimiting access to the system objects  Restriction of administration, control and viewing functions of the Administrator’s Guide. Allowed , and monitoring rights. Possible values:
    1. 0 - NoView —rightsNoView access rights.  The The method will return 1 if there are no administrative, control-, or viewing monitoring rights for to the object (red '"x'").
    2. 1 - NoControl —rightsNoControl access rights.  The The method will return 1 if there are only viewing monitoring rights (letter M).
    3. 2 - ViewAndControl —rightsViewAndControl access rights.  The The method will return 1 if there are control - and viewing monitoring rights for to the object (green boxcheckbox).
    4. 3 - ViewOrControl —rightsViewOrControl access rights. The method will return 1 if there is are either viewing monitoring or control rights for to the object.
    5. 4 - Not access rights (e.g. no —rightsNot access rights).
    6. 5 - Configure —rightsConfigure access rights.  The The method will return 1 if there are administrative, control- , and viewing monitoring rights for to the object (gray boxgrey checkbox).

For example: Based on a Computer object named "S-UYUTOVA", a Example. A Camera object with the identifier 1 has been created in the hardware tree . To determine on the basis of the Computer object with the "Comp" name. Find out the current access rights to the object.

Code Block
var i = 0;

for(i = 0; i <= 5; i++)

{

     var result =

    IsAvailableObject('S-UYUTOVAComp','CAM','1', i);

    DebugLogString("right "+i+" = "+result);

}