edmiGetInstanceAccessRights
EdmiError edmiGetInstanceAccessRights(SdaiInstance currInst, SdaiInstance *ownerId, SdaiInstance *groupOwnerId, SdaiUnsignedInt *protection, SdaiInstance **administrators, SdaiVoid *accessFor);
Returns all protection settings of a protected instance.
Arguments
Type | Name | Comment |
SdaiInstance | CurrInst | A numeric instanceID that uniquely identifies a protected instance in the EDMdatabase. This may be any protected instance in the database such as e.g repositories and models. |
SdaiInstance | OwnerId | Variable that will receive the instance Id of the EDMuser that owns the protected instance. Will be zero if the protected instance has no owner. |
SdaiInstance | GroupOwnerId | Variable that will receive the instance Id of the EDMgroup that owns the protected instance. Will be zero if the protected instance has no owner group. |
SdaiUnsignedInt | Protection | Returnes the protection defined for the specified protected instance. The value is a bitwise OR of any combination of the symbols listed below. |
SdaiInstance | Administrators | Variable that will receive a null-terminated buffer with a list of all the administrators of the protected instance. Administrators may be both EDMusers and EDMgroups. The buffer will be allocated by EDM and should be freed by edmiFree |
SdaiVoid | AccessFor | Null-terminated buffer of userIds and/or groupIds, each combined with their individually set access rights code. The buffer will be allocated by EDM and should be freed by edmiFree The access rights code is a bitwise OR of any combination of the symbols below: |
Return Value
Options
Example
EdmiError rstat; struct { SdaiInstance UserOrGroup; SdaiAccessCode AccessCode; } *accFor; . . . if (rstat = edmiGetInstanceAccessRights(myModel, &userId, &groupId, &protection, &administrators, (SdaiVoid *) &accFor)) { /* Error in operation */ printf("\nError: %s in edmiGetInstanceAccessRights \n", edmiGetErrorText(rstat)); goto error; }
See also
Filter by label
There are no items with the selected labels at this time.