Documentation for Intellect 4.9.8. Documentation for other versions of Intellect is available too.

Skip to end of metadata
Go to start of metadata

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

Method call syntax:

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 type param for the object; it returns 1 if these rights have been assigned.

Method arguments:

  1. compname - required. Corresponds to the name of the Computer object on which the object was created in the hardware tree.
  2. objtype - required. Corresponds to the type of the system object to which access rights are are being checked. Allowed values: String type; the set of values is restricted to the object types registered in the system.
  3. id - required. Corresponds to the identification (registration) number of the object of the type specified by the objtype argument. Allowed values: String type; the set of values is restricted to the identification numbers of objects of the specified type, which are registered in the system.
  4. param - required. Corresponds to the number of the type of rights which are being checked. A description of rights is given in Limiting access to the administration of the system objects, control and viewing functions of the Administrator’s Guide. Allowed values:
    1. 0 - NoView access rights. The method will return 1 if there are no administrative, control-, or viewing rights for the object (red 'x').
    2. 1 - NoControl access rights. The method will return 1 if there are only viewing rights (letter M).
    3. 2 - ViewAndControl access rights. The method will return 1 if there are control- and viewing rights for the object (green box).
    4. 3 - ViewOrControl access rights. The method will return 1 if there is either viewing or control rights for the object.
    5. 4 - Not access rights (e.g. no access rights).
    6. 5 - Configure access rights. The method will return 1 if there are administrative, control- and viewing rights for the object (gray box).

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

 

var i = 0;

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

{

     var result =

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

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

}
  • No labels