edmiRemoteChangeMyUser

EdmiError edmiRemoteChangeMyUser(SdaiServerContext serverContextId,
                                  SdaiUnsignedInt   sessionUserKey, 
                                  SdaiInvocationId  *edmiInvocationId);

 

Connecting a new EDMuser/EDMgroup without disconnecting the current connection. This function may only be used when the server context specifies a stateful LOCAL_CONTEXT communication with a local database.Provided that the new EDMuser/EDMgroup has sufficient access rights, all repositories and models will remain in the same open mode. Otherwise, access modes will be reduced to the highest access available for the new connection.

 

Arguments


  

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

        

Return Value


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

Options


                
           

 

Example


 

EdmiError rstat;
SdaiServerContext myLocalContext;
SdaiModel modelId;
SdaiString unavailMsg;
SdaiUnsignedInt suSessKey;
SdaiUnsignedInt mySessKey;
SdaiUnsignedInt access;
access = (PUBLIC_WRITE | PUBLIC_DELETE);
access |= (GROUP_WRITE | GROUP_DELETE);
access |= (OWNER_WRITE | OWNER_DELETE);
 
/* Define Remote Server Context */
rstat = edmiDefineServerContext("MyLocalContext",
NULL, NULL, NULL, "LOCAL_CONTEXT", NULL, NULL, 
NULL, NULL, NULL, NULL, NULL, &myLocalContext); 
/* Connect to local database */
rstat = edmiRemoteConnect(myLocalContext, "Johnny",
"Supervisor", "cf37ftr", &unavailMsg, NULL); 
 
/* Delete model 'LucysModel' as Johnny */
rstat = edmiRemoteChangeMyUserBN(myLocalContext, "superuser",
NULL, "xfx56kl9", &unavailMsg, &suSessKey, NULL); 
rstat = edmiRemoteGetModelBN(myLocalContext,
"DataRepository", "LucysModel", &modelId, NULL); 
rstat = edmiRemoteProtectInstance(myLocalContext,
modelId, access, NULL); 
rstat = edmiRemoteChangeMyUserBN(myLocalContext, "Johnny",
"Supervisor", "cf37ftr", &unavailMsg, &mySessKey, NULL); 
 
rstat = edmiRemoteDeleteModel(myLocalContext, "DataRepository",
"LucysModel", NULL); 
 
/* Delete model 'SarasModel' as Johnny */
rstat = edmiRemoteChangeMyUser(myLocalContext, suSessKey, NULL);
rstat = edmiRemoteGetModelBN(myLocalContext,
"DataRepository", "SarasModel", &modelId, NULL); 
rstat = edmiRemoteProtectInstance(myLocalContext, modelId, access, NULL);
rstat = edmiRemoteChangeMyUser(myLocalContext, mySessKey, NULL);
rstat = edmiRemoteDeleteModel(myLocalContext, "DataRepository", 
"SarasModel", NULL); 
. . .

 

See also

Filter by label

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

 

 

 



 

 

 

 

 

 

 

 

 

 

Â