RES_GROUP_INSERT, RES_GROUP_DELETE, RES_GROUP_DELETE_ALL, RES_GROUP_QUERY actions


Functions
The actions allows to control access rights in the D2000 system.


Declaration
RES_GROUP_INSERT resGroup, newMember [, bWithChildren = @FALSE]
 
RES_GROUP_DELETE resGroup, member

RES_GROUP_DELETE_ALL resGroup

RES_GROUP_QUERY resGroup, object, _bIsMember

Parameters
regGroupinReference to object of the Object group type.
newMemberinReference to object, that will be assigned to the Object group.
memberinReference to object, that will be unassigned from the Object group.
objectin

Reference to object.


bWithChildren
in

Identifier of the Bool type - The @TRUE value includes the object in the group also with descendants.  If the parameter is not specified or has the @FALSE value, the subject is not included in the group with descendants.

_bIsMemberoutIdentifier of the Bool type.
Description

The action are used to assign (RES_GROUP_INSERT) or unassigned (RES_GROUP_DELETE) objects to/from an Object group or unassigned all objects included in an Object group (RES_GROUP_DELETE_ALL). They dynamically allow changing of the access rights configuration when the application runs. Changes by means of the actions are written into the configuration database (restarting the application does not delete them).

The RES_GROUP_QUERY action allows to test if an object is assigned to an Object group. The return value _bIsMember gets one of the following values:

  • @TRUE - the object is in the group resGroup
  • @FALSE - the object is not in the group resGroup
  • invalid value - resGroup is not the reference to an object of Object group type
Example
The example assumes existence of the object SK of the Object group type.
 


BOOL _bIsMember
 
 RES_GROUP_QUERY SK, SysTime, _bIsMember
 IF _bIsMember\VLD THEN
   IF _bIsMember THEN
     ; the object SysTime is in the group SK
     ; remove from the group
     RES_GROUP_DELETE SK, SysTime
   ELSE
     ; the object SysTime is not in the group SK
     ; assign to the group
     RES_GROUP_INSERT SK, SysTime
   ENDIF
 ELSE
   ; invalid parameters
 ENDIF

Related pages:

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ť .