ade_usergetrights

AutoCAD Map 3D AutoLISP

Up a level
ade_usergetrights
 
 

Gets the access rights of a user.

(ade_usergetrights [username])

Returns a bit code for the rights allowed. See the User Rights Codes table below.

username Login name (string), at most 32 characters.

If the username argument is omitted or nil, the function returns the rights of the current user.

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.

If the username argument is omitted or nil, and there is no current user, the function returns a bit code with all bits set, because the no-current-user condition is possible only if the system option "ForceUserLogin" is set to nil, in which case all users have all rights except those reserved for a superuser.

Only a superuser can specify a login name other than their own. If the username argument is not the login name of the current user, and the current user does not have superuser rights, the function returns nil, and the message "Access is denied" is added to the error stack.