ade_usersetrights

Land Desktop Development ARX CPP SDK

Up a level
ade_usersetrights
 
 

Sets the access rights for a user.

int

ade_usersetrights(

char* userName,

int userRights);

Returns RTNORM or an error code.

userName Login name.
userRights An integer equal to the sum of the rights to allow. See the User Rights Codes table below.
User Rights Codes
CodeUser Rights
 1 Superuser (in which case the other bits don't matter).
 2 Permission to alter the drawing set.
 4 Permission to edit objects.
 8 Permission to execute a draw query.
16 Permission to edit Feature Class definition.

This function cannot execute unless the current user has superuser rights, and it cannot change the rights of the current user in any case. If an ordinary user is logged in when this function is called, or a superuser is logged in and the function call would change the rights of the current user, the function returns an error code of -1002, and the following message is added to the error message stack:

Access denied