CheckForbiddenStrings: Boolean;
CheckForbiddenStrings: System.Boolean;
The CheckForbiddenStrings property determines whether password check is used for possessing disabled lines.
If the property is set to True, a new password is checked for possessing disabled lines, specified in the ForbiddenStrings list, when changing the password.
To execute the example, add links to the Metabase, Collections (ForeCollections), ForeSystem (for Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
PassPol: IMetabasePasswordPolicy;
Zapret: IStringList;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
MU := MS.Policy;
PassPol := MU.PasswordPolicy;
Zapret := PassPol.ForbiddenStrings;
// Determine the check whether password includes forbidden strings
PassPol.CheckForbiddenStrings := True;
// Clear the list and add forbidden words
Zapret.Clear;
Zapret.Add("abc");
Zapret.Add("123");
Zapret.Add("admin");
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeCollections;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params : StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
MU: IMetabasePolicy;
PassPol: IMetabasePasswordPolicy;
Zapret: System.Collections.Generic.IList<System.String>;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
MU := MS.Policy;
PassPol := MU.PasswordPolicy;
Zapret := PassPol.ForbiddenStrings;
// Determine the check whether password includes forbidden strings
PassPol.CheckForbiddenStrings := True;
// Clear the list and add forbidden words
Zapret.Clear();
Zapret.Add("abc");
Zapret.Add("123");
Zapret.Add("admin");
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example password check for possessing disabled lines is set and three forbidden values are added to the list.
See also: