CurrentAccessLevel (NotesDatabase - JavaScript)

Read-only. The current user's access level to a database.

Defined in

NotesDatabase

Syntax

getCurrentAccessLevel() : int

Legal values

  • 1 ACL.LEVEL_DEPOSITOR
  • 2 ACL.LEVEL_READER
  • 3 ACL.LEVEL_AUTHOR
  • 4 ACL.LEVEL_EDITOR
  • 5 ACL.LEVEL_DESIGNER
  • 6 ACL.LEVEL_MANAGER

Usage

If a program runs on a workstation or is remote (IIOP), CurrentAccessLevel is determined by the access level of the current user. If a program runs on a server, CurrentAccessLevel is determined by the access level of the person who last saved the program (the owner).

The database must be open to use this property.

Examples

This computed field displays the access level for the current database.
function convertAccessLevel() {
	switch (database.getCurrentAccessLevel()) {
		case NotesACL.LEVEL_DEPOSITOR : return "depositor";
		case NotesACL.LEVEL_READER : return "reader";
		case NotesACL.LEVEL_AUTHOR : return "author";
		case NotesACL.LEVEL_EDITOR : return "editor";
		case NotesACL.LEVEL_DESIGNER : return "designer";
		case NotesACL.LEVEL_MANAGER : return "manager";
	}
}
return "Your access level for this database is " + convertAccessLevel() + "."