MakeEqualToTemplate Method (DACL Object)

Topic Last Modified: 2006-06-13

Sets the masks in a DACL object equal to the masks of a specified entity in a DACL template object.

Applies To

DACL Object

Syntax


objResult  objDACL.MakeEqualToTemplate(strName, objDACLTemplate, strNT4NameInDACLTemplate);

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.

Return Value

An object that returns error codes and descriptions.

Remarks

This method is the same as the ModifyByTemplate method, except that the only action taken is to make the DACL object equal to the template.

The following possible error messages can be returned:

  • Person not found.
  • Template entity not found.

Example

var objLRoles = DaclLegacyRoles();
var objErr = objDacl.MakeEqualToTemplate("MYDOMAIN\\User1", objLRoles, "Reviewer");
if(FAILED(objErr.number)){
   //something went wrong, print err.description
}