edmiProtectInstance

EdmiError edmiProtectInstance(SdaiAppInstance currInst,
                               SdaiUnsignedInt protection);

Sets new protection code on a protected instance. When a protected instance is created, the default protection code is set according to default values that are set as configuration parameters in the database. These default settings may be changed by the owner/administrators of the protected instance or by the superuser.

Arguments


TypeNameComment
SdaiAppInstance

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.

SdaiUnsignedInt

Protection

Specifies the protection to be set for the specified protected instance. The value should be a bitwise OR of any combination of the symbols listed below.
OWNER_READ, OWNER_WRITE, OWNER_CREATE, OWNER_EXECUTE, OWNER_DELETE
GROUP_READ, GROUP_WRITE, GROUP_CREATE, GROUP_EXECUTE, GROUP_DELETE
PUBLIC_READ, PUBLIC_WRITE, PUBLIC_CREATE, PUBLIC_EXECUTE, PUBLIC_DELETE
 
If no access shall be set at all for either owner, group owner or public, use the symbols below
OWNER_NONE, GROUP_NONE, PUBLIC_NONE

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

Options


 

Example


 

EdmiError rstat;
 SdaiModel modId;
 SdaiUnsignedInt owner_protection;
 SdaiUnsignedInt group_protection;
 SdaiUnsignedInt public_protection;
 SdaiUnsignedInt protection;
  
 . . .
 owner_protection = OWNER_WRITE | OWNER_CREATE | OWNER_DELETE;
 group_protection = GROUP_READ;
 public_protection = PUBLIC_NONE;
 protection = owner_protection | group_protection | public_protection;
  
 if (rstat = edmiProtectInstance(modId, protection)) {
 /* Error in operation */ 
 printf("\nError: %s in edmiProtectInstance \n",
 edmiGetErrorText(rstat)); 
 goto error; 
 }

 

See also

Filter by label

There are no items with the selected labels at this time.

Â