getUserPolicySettings (NotesSession - JavaScript™)
Gets a policy document.
Defined in
NotesSessionSyntax
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.
|
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";
}
}