@SetACL
Syntax
@SetACL(NOTESPATH;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES);
@SetACL(DBHANDLE;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES);
@SetACL(NOTESPATH;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES;FLAGS);
@SetACL(DBHANDLE;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES;FLAGS);
Description
Writes the ACL described by PARAMETERS2-5 to the database identified by DBHANDLE DBHANDLE.
This ACL must always contain at least one entry with ACL-LEVEL=6.
The APIEngine server that writes the ACL must have Manager access to the database to which the ACL is to be written.
If the database is opened locally, that is, without a server name before the NOTESPath of the database, this is always the case.
@SetACL returns either 1 (NUMBER) or an error.
TEXT/TEXTLIST USERNAMES:
The ACL name entries.
FN/FNLIST USERLEVELS:
The corresponding ACL-LEVEL.
TEXT/TEXTLIST 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
TEXT/TEXTLIST PRIVILEGESNAMES:
The privilege names.
The first 5 elements of this list are reserved for pre-V3-Notes compatible privileges.
Each element in this list corresponds to the respective privilege. For example, the name of privilege number 8 is stored in the eighth element.
Unused privileges must be represented by empty elements.
FN FLAGS:
1 Enforce a consistent ACL across all replicas.
FN ACL-LEVEL:
6=Manager
5=Developer
4=Editor
3=Author
2=Depositor
1=Reader
0=No Access
Beispiel: @SetACL(DBHANDLE;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES);
DBHANDLE:=@OpenDB("TEST.NSF");
USERNAMES:="Manager":"-Default-";
USERLEVELS:=6:0;
USERPRIVILEGES:="1,2,3,4,5":"";
PRIVILEGESNAMES:="P1":"P2":"P3":"P4":"P5";
Err:=@SetACL(DBHANDLE;USERNAMES;USERLEVELS;USERPRIVILEGES;PRIVILEGESNAMES);
@LogReport(Err);
DBHANDLE:=@CloseDB(dbh1);
An ACL is created with a manager named "Manager" and the first five privileges, as well as with Default access set to No Access.
The privileges have the following names:
Privilege 1 = "P1"
Privilege 2 = "P2"
Privilege 3 = "P3"
Privilege 4 = "P4"
Privilege 5 = "P5"
Note : This text was machine-translated and may contain inaccuracies.
