Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
Removes an EDMuser from an EDMgroup. EDMusers may be members of any number of EDMgroups. Access to database objects may be set for EDMgroups as well as for EDMusers. Access Checking will only be performed if the EDMuser is connected with an EDMgroup.
Only the superuser may use this function.
Related functions: edmiRemoteUserToGroup, edmiRemoteUserFromGroupBN.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteUserFromGroup(SdaiServerContext serverContextId,
                                   SdaiGroup         groupId,
                                   SdaiUser          userId, 
                                   SdaiInvocationId  *edmiInvocationId);
 
Arguments:

serverContextId

Context identification, from edmiDefineServerContext

groupId

The numeric groupID that uniquely identifies the EDMgroup from which to remove the EDMuser.

userId

The numeric userID that uniquely identifies the EDMuser to be removed from the EDMgroup.

edmiInvocationId

Currently not used.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
EdmiError rstat;
SdaiServerContext suContext;
SdaiUser lucyUserId;
SdaiGroup guestGroupId, friendGroupId;
 
/* Define Remote Server Context
for the superuser */ 
rstat = edmiDefineServerContext("SuperUserContext",
"superuser", NULL, "xfx56kl9",
"TCP", "9090", "MyServerHost",
NULL, NULL, NULL, NULL, NULL, &suContext); 
 
/* Get the group Ids */
rstat = edmiRemoteGetGroup(suContext, "Guest", &guestGroupId, NULL);
rstat = edmiRemoteGetGroup(suContext, "Friend", &friendGroupId, NULL);
 
/* Get the user Id for 'Lucy' */
rstat = edmiRemoteGetUser(suContext, "Lucu", &lucyUserId, NULL);
 
/* Remove user 'Lucy' from group 'Guest' */
rstat = edmiRemoteUserFromGroup(suContext, guestGroupId, lucyUserId, NULL);
 
/* Insert user 'Lucy' into group 'Friend' */ 
rstat = edmiRemoteUserToGroup(suContext, friendGroupId, lucyUserId, NULL);
. . .

  • No labels