Given a server and file name, indicates the current user's level of access to the database.
@UserAccess( server : file ; [ accessPrivilege ] )
server
Text. The name of the server. Use an empty string ("") to indicate the local computer.
file
Text. The path and file name of the database. Specify the database's path and file name using the appropriate format for the operating system.
[ accessPrivilege ]
Keyword. Optional. Specify one of the following keywords to return a user's access level or test for a specific database privilege, instead of returning a list containing all of the user's access information:
Level |
User's access level |
---|---|
1 |
Depositor |
2 |
Reader |
3 |
Author |
4 |
Editor |
5 |
Designer |
6 |
Manager |
The following return 1 (True) if the user has the specified privilege and 0 (False) if the user does not. These privileges are assigned in the Access Control List for the database.
If you specify one or more keywords, returns a text value or a text list containing the following values:
If you specify no keywords, returns a text list of values for the following keywords:
@UserAccess does not test for access to the ReplicateOrCopyDocuments privilege by default.
On a local database without "Enforce a consistent Access Control List," @UserAccess without the second parameter always returns 6; 1; 1; 1; 1; 1; 1; 1; 1. If the current user has No Access to the database, Notes/Domino displays a message: "You are not authorized to perform that operation."
This function does not work in column or selection formulas, or in agents that run on a server (mail and scheduled agents). Hence it does not work with the Evaluate statement.
@UserAccess( "Gaborone" : "discuss\\nun.nsf" )
@If(@UserAccess( "" : "discuss\\nun.nsf" ; [CREATEDOCUMENTS]) = "1";@Command([Compose];"MyOpinion");@Prompt([OK];"Access denied";"Sorry, you do not have permission to create documents in this database."))
@UserAccess( @DbName )
QueryAccess method of LotusScript NotesDatabase class
CurrentAccessLevel property of LotusScript NotesDatabase class
queryAccess method of Java Database class
CurrentAccessLevel property of Java Database class