@ServerAccess (Formula Language)

Checks if a specified user has a specified administrative access level to a server.

Note: This @function is new with Release 6.

Syntax

@ServerAccess( [ access ] ; userName ; serverName )

Parameters

[ access ]

Keyword. Supply one of the following keywords to represent the access level you want to check for:

[ACCESS]

User has administrative access to the server.

[CREATEDATABASE]

User can create a database on the server.

[CREATEREPLICA]

User can create a replica of a database on the server.

[CREATETEMPLATE]

User can create a master template on the server.

[DATABASEACCESS]

User has administrative access to the server, which enables him or her to perform all the tasks that adminstrators with Access level access can perform, except users with DatabaseAccess cannot issue remote console commands.

[FULLACCESS]

User has full administrative access to the server and is given manager access to all databases hosted by the server, regardless of the database's ACL settings.

[REMOTEACCESS]

User can issue remote console commands to the server.

[RESTRICTEDSYSTEMACCESS]

User can issue only those operating system commands that are listed as Restricted System commands.

[SYSTEMACCESS]

User can issue operating system commands to the server.

[TRACKMESSAGE]

User can track email messages, but cannot view the contents of the Subject field of mail memos.

[TRACKMESSAGESUBJECT]

User can track email messages and can view the contents of the Subject field of mail memos.

[VIEWONLYACCESS]

User can issue a subset of remote console commands that supply information about the server; they cannot execute remote commands that affect the server's operation.

These access levels are set by the server administrator on the Security tab of the Current® Server Document in the Server settings found on the Configuration tab of the Domino® Administrator client.

userName

Text; not case-sensitive. Hierarchical name of the user whose access you want to check, enclosed in quotation marks. If you supply a short name, this function returns zero. You can use @UserName to supply the name of the current user to @ServerName.

serverName

Optional. Text; not case-sensitive. Name of the server you want to test the user's access level to, enclosed in quotation marks. If not provided, tests the user's access to the server hosting the current database. If the current database is Local, tests the user's access to the server that is listed as the Administrative server in the database ACL for the current database. If no Administrative server is set, returns zero.

Note: This parameter is required when using @ServerAccess in a toolbar button.

Return value

flag

Boolean.

  • 1 (True) indicates that the specified user has the specified access
  • 0 (False) indicates that the specified user does not have the specified access

Examples

  1. This code, when added as the default value of a field in a database on the ocean/bay server, returns 1 if Luisa Albright is listed as having standard administrative access to the ocean/bay server in the server document for ocean/bay.
    @ServerAccess([ACCESS];"Luisa Albright/bay";"ocean/bay")
  2. This code, when added as the default value of a field in a Local database that has ocean/bay selected as its Administrative server on the Advanced tab of the database's ACL dialog box, returns 1 if Luisa Albright has standard administrative access to the ocean/bay server.
    @ServerAccess([ACCESS];"Luisa Albright/bay")
  3. This code, when added as the default value of a field in a database running on the ocean/bay server, returns 1 if the current user has full access to the ocean/bay server and all of its databases.
    @ServerAccess([FULLACCESS];@UserName)
  4. This code, when added as the default value of a field, returns 0 because it does not recognize the short user name.
    @ServerAccess([ACCESS];"Luisa Albright";"ocean/bay")
  5. This code, when added as the default value of a field, returns 0 if Luisa Albright does not have full access to the ocean/bay server and all of its databases.
    @ServerAccess([FULLACCESS];"Luisa Albright/bay";"ocean/bay")