grantAccess (Database - Java™)
Modifies a database access control list to provide a specified level of access to a person, group, or server.
Note: Using this method at the same time an
ACL object is in use may produce inconsistent results.
Defined in
Syntax
public void grantAccess(String name, int level)
throws NotesException
Parameters
String name
The name of the person, group, or server whose access level you want to provide or change. For a hierarchical name, the full name must be specified but can be in abbreviated format.
int level
The level of access you're granting. Specify one of the following constants:
- ACL.LEVEL_AUTHOR
- ACL.LEVEL_DEPOSITOR
- ACL.LEVEL_DESIGNER
- ACL.LEVEL_EDITOR
- ACL.LEVEL_MANAGER
- ACL.LEVEL_NOACCESS
- ACL.LEVEL_READER
Usage
If the namealready exists in the ACL, this method updates it with the access. Otherwise, the name is added to the ACL with the level.
You can also use this method to deny access to a person, group, or server by assigning LEVEL_NOACCESS.
This method sets ACL roles to their default values.