@V4UserAccess (Formula Language)

Given a server and file name, indicates the current user's level of access to the database.

Note: This @function is new with Release 5. If you used @UserAccess in Release 4, it is automatically converted to @V4UserAccess in Release 5 or later to preserve the functionality of your formulas. With Release 5 and later, more user access information is returned by @UserAccess. If you change those formulas to use @UserAccess, be sure to recompile them under the later release. If you use @UserAccess in Release 5 or later, a database created in Release 4 does not recognize the formula until you upgrade it. If the formula will be evaluated in Release 4, use @V4UserAccess.

Syntax

@V4UserAccess( server : file )

Parameters

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.

Return value

level ; create ; delete

Text list.

  • level is a number from 1 to 6 that indicates the user's access level to the database.

    Level

    User's access level

    1

    Depositor

    2

    Reader

    3

    Author

    4

    Editor

    5

    Designer

    6

    Manager

  • create is a number that returns 1 (True) if the user can create documents in the database, and 0 (False) if not.
  • delete is a number that returns 1 (True) if the user can delete documents from the database, and 0 (False) if not.

On a local database without "Enforce a consistent Access Control List," @V4UserAccess always returns 6; 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."

Usage

This function does not work in column or selection formulas, or in agents that run on a server (mail and scheduled agents).

Examples

  1. This formula returns 4; 1; 1 if the user has Editor access, permission to create documents, and permission to delete documents, in a database with the path of DSource\lookup.nsf on server Galactica/Space/Federation.
    @V4UserAccess( "Galactica//Space//Federation" : "dsource\\lookup.nsf" )
  2. This formula returns 6;1;1, despite the user's access level and permissions, since the customer.nsf database is running on the local server. Or if the user has No Access to the database, "You are not authorized to perform that operation" displays instead.
    @V4UserAccess("":"\\Notes\\Data\\customer.nsf")
  3. This formula returns 6; 1; 0 if the user has Manager access, permission to create documents, and no permission to delete documents in the current database if the database is running on a server other than the local server.
    @V4UserAccess( @DbName )