AddEmptySecurityEntity Method
Topic Last Modified: 2006-06-13
Adds a new entity object with empty masks to a discretionary access control list (DACL) object s entity collection.
Applies To
Syntax
objResult objDACL.AddEmptySecurityEntity(strSIDType, strSID, strNT4Name, strDisplayName, [bInherited]);
Parameters
strSIDType
A string value of one of the security identifier types as listed in the following table.Security Identifier Type (SID) user
group
domain
alias
well_known_group
deleted_account
invalid
unknown
computer
- strSID
A string value of the name of the security identifier (SID), such as "S-1-1-0".
- strNT4Name
A string value of the domain and user name of a security principal.
- strDisplayName
A string value of the display name for the specified trustee such as an "Administrator." This display name is derived from the Windows 2000 Active Directory object for this trustee.
- bInherited
Optional. A Boolean value to specify that the entity is inherited.
Return Value
An object that returns error codes and descriptions.
Remarks
This method creates a new entity with masks set to 0 and removes any duplicates.
You can use an empty string, "", for the strSIDType parameter. However, a specified SID type results in improved performance in other DACL-related function calls.
Example
var objResult = objDacl.AddEmptySecurityEntity("user", "S-1-1-10-...", "MyDomain\User1", "Jane Clayton");
if( 1 == objResult.number) {
// 0 means user was added, no errors
// 1 means no error, but the user was not added - might be a duplicate
}