ModifyByTemplate Method

ModifyByTemplate Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Performs a specified action on any masks in a DACL object that match any masks of a specified entity in a DACL template object.

Applies To

DACL Object

Syntax

[JScript] objResult  objDACL.ModifyByTemplate(strNameobjDACLTemplatestrNT4NameInDACLTemplatestrAction);

Parameters

  • strName
    A string value of an entity to match in the DACL template. This value can either be the domain and username of a user or group, or a predefined role such as an "Author."
  • objDACLTemplate
    A DACL object used as a template.
  • strNT4NameInDACLTemplate
    A string value of the name of an entity in the DACL template object used to compare with the DACL object being evaluated.
  • strAction
    One of the actions described in the following table.
    Action Description of action taken
    Make Sets the masks of the DACL object equal to the template DACL object.
    Set Bit-wise OR the masks according to the template DACL object.
    Clear Bit-wise AND-NOT the masks according to the template DACL object.

Return Value

An object that returns error codes and descriptions.

Remarks

The following possible error messages can be returned:

  • Person not found.
  • Template entity not found.
  • Action parameter not recognized.

Person not found. Template entity not found. Action parameter not recognized.

Example

The following example finds User1 in an objLRoles DACL template object and attempts to clear the reviewer permissions from User1's masks. The "Reviewer" is an entity in the objLRoles object.

var objLRoles = DaclLegacyRoles();

var objErr = objDacl.ModifyByTemplate("MYDOMAIN\User1", objLRoles, "Reviewer", "Clear"); if(FAILED(objErr.number)){ //error handling code. }

See Also

ClearByTemplate Method

MakeEqualToTemplate Method

SetByTemplate Method

DACL Templates

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.