edmiProtectModel

EdmiError edmiProtectModel(SdaiModel    model,
                            SdaiInteger  protection); 

Defines access rights to the specified model. The available access rights are read, write, or none. Write access implies read access. When a model is created the model protection is set equal to the default model protection of the EDMuser that creates the model. The default model protection can be set by the edmiSetUsersDefaultProtection function. The model protection can be set with respect to three different EDMuser categories: the model owner, EDMusers that are members of the model owner group, and all other users. Only the owner of a model is allowed to change the access rights for the model.

 

Arguments


TypeNameComment
SdaiModel

model

A numeric modelID that uniquely identifies the model in the EDMdatabase to define the model protection of.  The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

SdaiInteger

protection

Specifies the protection to be defined for the specified model. The value should be a bitwise OR of one symbol from each of the following three lines.
OWNER_WRITE, OWNER_READ, OWNER_NONE,
GROUP_WRITE, GROUP_READ, GROUP_NONE,
PUBLIC_WRITE, PUBLIC_READ, PUBLIC_NONE.
Example: OWNER_WRITE

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 model;
 . . .
 if (rstat = edmiProtectModel (model,
 OWNER_WRITE | GROUP_READ | PUBLIC_NONE)) { 
 /* Error in operation */ 
 printf("\nError: %s in edmiProtectModel\n", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }

 

See also

Filter by label

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

Â