Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
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
Blok kódu | ||||
---|---|---|---|---|
| ||||
RES_GROUP_INSERT resGroup, newMember RES_GROUP_DELETE resGroup, member RES_GROUP_DELETE_ALL resGroup RES_GROUP_QUERY resGroup, object, _bIsMember |
Parameters
regGroup | in | Reference to object of Object group type. |
newMember | in | Reference to object, that will be assigned to the Object group. |
member | in | Reference to object, that will be unassigned from the Object group. |
object | in | Reference to object. |
_bIsMember | out | Identifier of 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 allow to dynamically change the configuration of access rights 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 Object group type.
Blok kódu | ||||
---|---|---|---|---|
| ||||
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 |