@ACLGetEffectiveUserAccess
Syntax
@ACLGetEffectiveUserAccess(hACL;hNamesList;UserLevel;UserPrivileges);
@ACLGetEffectiveUserAccess(hACL;hNamesList;UserLevel;UserPrivileges;UserPrivilegesNames);
Description
This @Function determines the effective access of a user to the specified database based on a previously read ACL and a name list.
Both the access explicitly assigned to the user and the user’s direct and indirect group memberships are taken into account.
The function returns the resulting effective access level as well as the ACL privileges and ACL flags effective for the user.
Optionally, the names of the effective privileges or roles can also be returned.
As input, the function requires a VSPECHACL handle created with @ReadACL and a VSPECHNAMELIST handle, which can be created using @ResolveUserGroups.
VSPECHACL hACL:
A VSPECHACL handle as returned by @ReadACL.
VSPECHNAMELIST hNamesList:
A VSPECHNAMELIST handle as returned by @ResolveUserGroups.
NUMBER UserLevel:
6=(Manager) Manager
5=(Developer) Developer
4=(Editor) Editor
3=(Author) Author
2=(Reader) Reader
1=(Depositor) Depositor
0=(No Access) No Access
TEXT UserPrivileges:
The user’s privileges and ACL flags. The individual privileges and ACL flags are separated by commas.
The first 5 ACL privileges are reserved for pre-V3-Notes databases.
Although these privileges can still be queried here and can also be set using the Engine, they should no longer be used (legacy support only!).
Roles/Privileges:
1-5 pre V3 privileges
6-80 >V3 roles
ACL-Flags:
ACC Author can create new documents
CPA Create personal agent allowed
CPF Create personal folder/view allowed
CD Can delete (on a level >= Author)
CF Create Folder allowed
CLS Create Lotus Script allowed
ASRV Admin-Server entry
SRV Server entry
PRS Personen entry
GRP Gruppen entry
RPD Read public documents
WPD Write public documents
MDA The user cannot register monitors for this database
NRC The user can neither copy nor replicate this database
ARA The administration server can modify Reader or Author fields
TEXTLIST UserPrivilegesNames:
The names of the privileges or roles assigned to this user.
Return:
In case of an error, the @Function returns @ERROR; otherwise, it returns TRUE.
Beispiel: @ACLGetEffectiveUserAccess(hACL;hNamesList;UserLevel;UserPrivileges;UserPrivilegesNames);
dbPath:="TEST\\TESTDB1.NSF";
UserToResolve:="CN=Karl Mustermann/O=ACME/C=DE";
Ret:=@ResolveUserGroups(UserToResolve;hNamesList);
dbh:=@OpenDB(dbPath);
hACL:=@ReadACL(dbh);
dbh:=@CloseDB(dbh);
Ret:=@ACLGetEffectiveUserAccess(hACL;hNamesList;UserLevel;UserPrivileges;UserPrivilegesNames);
Ret:=@DestroyNameList(hNamesList);
hACL:=@ReleaseACL(hACL);
@LogReport(UserLevel);
@LogReport(UserPrivileges);
@LogReport(UserPrivilegesNames);
The example first determines the complete name list for the Domino user "CN=Karl Mustermann/O=ACME/C=DE", including all direct and indirect group memberships.
The database TEST\TESTDB1.NSF is then opened, an in-memory copy of its ACL is created, and the database is closed again.
Using @ACLGetEffectiveUserAccess, the user’s effective access level, effective ACL privileges and ACL flags, as well as the names of the privileges effective for this user, are determined based on the ACL and the name list. The handles used are then released, and the resulting values are logged to the APILOG.
Note : This text was machine-translated and may contain inaccuracies.
