Returns a person's, group's, or server's current access level to a database.
Parameter | Description |
---|---|
name | The name of the person, group, or server. For a hierarchical name, the full name must be specified but can be in abbreviated format. |
Return value | Description |
---|---|
int | The current access level, which is one of the
following:
|
If the name you specify is not listed explicitly in the ACL, queryAccess checks if the name is a member of a group in the primary Address Book known to the computer on which the script is running. On a local workstation, that address book is the Personal Address Book. On a server, that address book is the Domino® Directory. If queryAccess finds the name in one or more groups, it returns the highest access level among those groups. If the name you specify is not listed in the ACL either individually or as part of a group, queryAccess returns the default access level for the ACL.
var title:string = database.getTitle();
title = "For database \"" + title + "\" you have ";
var accLevel:int = database.queryAccess(session.getUserName());
switch (accLevel) {
case(NotesACL.LEVEL_NOACCESS) : return title + "no access";
case(NotesACL.LEVEL_DEPOSITOR) : return title + "depositor access";
case(NotesACL.LEVEL_READER) : return title + "reader access";
case(NotesACL.LEVEL_AUTHOR) : return title + "author access";
case(NotesACL.LEVEL_EDITOR) : return title + "editor access";
case(NotesACL.LEVEL_DESIGNER) : return title + "designer access";
case(NotesACL.LEVEL_MANAGER) : return title + "manager access";
default: return title + "unknown access";
}
QueryAccess method in LotusScript® NotesDatabase class
queryAccess method in Java™ Database class