getUserPolicySettings (NotesSession - JavaScript)

Gets a policy document.

Defined in

NotesSession

Syntax

getUserPolicySettings(server:string, name:string, type:int) : NotesDocument

getUserPolicySettings(server:string, name:string, type:int, explicitpolicy:string) : NotesDocument

Parameter Description
server The name of the server containing the policy. An empty string means the local computer.
name The name of the effective user of the policy. The name must be fully qualified.
type The type of policy.
  • 0 NotesSession.POLICYSETTINGS_REGISTRATION
  • 1 NotesSession.POLICYSETTINGS_SETUP
  • 2 NotesSession.POLICYSETTINGS_ARCHIVE
  • 3 NotesSession.POLICYSETTINGS_SECURITY
  • 4 NotesSession.POLICYSETTINGS_DESKTOP
  • 5 NotesSession.POLICYSETTINGS_MAIL
explicitpolicy The policy namespace, with slash (/) prefix, that contains the settings. If this parameter is specified, the second parameter is not used.
Return value Description
NotesDocument A read-only document that represents the effective or explicit policy. Returns null if the specified policy is not available.

Usage

See "Policy Documents" in Domino® Administrator Help.

Examples

This button dumps the mail policy settings for a user.
var doc:NotesDocument = session.getUserPolicySettings(
	"server2/Acme", "Jo User", 
	NotesSession.POLICYSETTINGS_MAIL);
if (doc == null) {
	requestScope.status = "No policy document";
} else {
	var items = doc.getItems().iterator();
	while (items.hasNext()) {
		var item:NotesItem = items.next();
		requestScope.status +=	item.getName() + " = " +
		item.getText() + "\n";
	}
}