Valid: Boolean;
Valid: boolean;
The Valid property returns whether security subject identifier is correct (valid).
The property is read-only.
Available values:
True. Identifier is valid.
False. Identifier is not valid.
Executing the example requires that the repository contains an object with the SID identifier.
Add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
SDesc: ISecurityDescriptor;
SID: ISid;
sValid: Boolean;
Begin
MB := MetabaseClass.Active;
SDesc := MB.ItemById("SID").SecurityDescriptor;
SID := SDesc.Acl.Item(0).Sid;
sValid := SID.Valid;
If sValid = True Then
Debug.WriteLine("Valid");
Else Debug.WriteLine("Not Valid");
End If;
End Sub UserProc;
After executing the example the console window shows result of checking for validity of security subject identifier, which is the first in the list of the user having access permissions for the SID object.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
SDesc: ISecurityDescriptor;
SID: ISid;
sValid: boolean;
Begin
MB := Params.Metabase;
SDesc := MB.ItemById["SID"].SecurityDescriptor;
SID := SDesc.Acl.Item[0].Sid;
sValid := SID.Valid;
If sValid = True Then
System.Diagnostics.Debug.WriteLine("Valid");
Else System.Diagnostics.Debug.WriteLine("Not Valid");
End If;
End Sub;
See also: