edmiSetUsersDefaultProtection

EdmiError edmiSetUsersDefaultProtection(SdaiInstance userId,
                                         SdaiInteger  protection); 

Defines the default model protection for the specified EDMuser. The default model protection is set as the model protection when a model is created. The default model protection can be set with respect to three different EDMuser categories: the model owner, EDMusers that are members in the model owner group, and all other users. The available access rights to assign to these user categories are: read and write access, read only access, and no access. All EDMusers can change their own default model protection. The superuser can change the default model protection of any EDMuser.

Arguments


TypeNameComment
SdaiInstance

userId

A numeric userID that uniquely identifies an edm_user instance in the EDMdatabase that defines the EDMuser of interest.

SdaiInteger

protection

Specifies the protection to be defined as the default model protection of the specified EDMuser. The value should be a bitwise OR of one symbol from each of the following three lines.
OWNER_WRITE, OWNER_READ, OWNER_NONE, GROUP_READ, GROUP_WRITE, GROUP_READ, GROUP_NONE, PUBLIC_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;
 SdaiInstance userId;
 . . .
 if (rstat = edmiSetUsersDefaultProtection(
 userId, 
 OWNER_WRITE | GROUP_WRITE | PUBLIC_READ)) { 
 /* Error in operation */ 
 printf("\nError: %s in edmiSetUsersDefaultProtection \n", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 . . . 

 

See also

Filter by label

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