AsString: String;
The AsString property determines the identifier of security subject in the string format.
On creating the security subject the string representation of the identifier is generated automatically. It cannot be changed afterwards.
The value of the identifier in the string view can be changed if the new instance of the class is created . Further this instance can be used for example for searching the security subjects.
Function FindSubjectToSid(MB: IMetabase; sSid: String): ISecuritySubject;
Var
MBSec: IMetabaseSecurity;
NewSid: ISid;
Subject: ISecuritySubject;
Begin
NewSid := New MetabaseSid.Create;
NewSid.AsString := sSid;
MBSec := MB.Security;
Subject := MBSec.ResolveSid(NewSid);
If IsNull(Subject) Then
Return Null;
Else
Return Subject;
End If;
End Function FindSubjectToSid;
The specified function can be used to search for the security subjects if the string representation of their security identifier is known. The identifier is passed as the sSid input parameter. In case of successful search the function returns the parameters of the found subject, otherwise the value is Null.
See also: