IMetabaseSecurity.ResolveSid

Syntax

ResolveSid(Sid: ISid): ISecuritySubject;

Parameters

Sid. Security subject identifier.

Description

The ResolveSid method returns parameters of the security subject, which identifier is passed as the Sid parameter.

Comments

If the security subject does not exist, the method returns Null.

Example

To execute the example, make sure that the repository contains an object with the Obj_1 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Sec: IMetabaseSecurity;
    SecDesc: ISecurityDescriptor;
    Acl: IAccessControlList;
    Ace: IAccessControlEntry;
    Subject: ISecuritySubject;
Begin
    MB := MetabaseClass.Active;
    Sec := MB.Security;
    SecDesc := MB.ItemById(
"Obj_1").SecurityDescriptor;
    Acl := SecDesc.Acl;
    
For Each Ace In Acl Do
        Subject := Sec.ResolveSid(Ace.Sid);
        
If Ace.Type = AceType.AccessAllowed Then
            Debug.Write(
"Permissive parameter. Access mask: " + Ace.AccessMask.ToString);
            Debug.WriteLine(
"; Security subject:" + Subject.Name);
        
Else
            Debug.Write(
"Prohibitive parameter. Access mask: " + Ace.AccessMask.ToString);
            Debug.WriteLine(
"; Security subject: " + Subject.Name);
        
End If;
    
End For;
End Sub UserProc;

After executing the example the development environment console displays information about additional security parameters of the Obj_1 object. Information about the security subject, for which the specified parameter is added, is obtained by the security subject identifier.

See also:

IMetabaseSecurity