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
Type | Name | Comment |
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. |
Return Value
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.
Â