RestrictGroupDeletion: Boolean;
RestrictGroupDeletion: System.Boolean;
The RestrictGroupDeletion property determines whether the deletion of groups is allowed if the group has effective permissions for the repository objects.
By default the property is set to False, groups can be deleted.
To save a new value, apply security policy using the IMetabaseSecurity.Apply property.
To execute the example, add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Isa: IMetabaseUser;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
Policy := MS.Policy;
// Prohibit group deletion
Police.RestrictGroupDeletion := True;
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Isa: IMetabaseUser;
Policy: IMetabasePolicy;
Lic: Object;
Begin
MB := Params.Metabase;
// Get license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
MS := MB.Security;
Policy := MS.Policy;
// Prohibit group deletion
Police.RestrictGroupDeletion := True;
// Save changes
MS.Apply();
// Check in license
Lic := Null;
End Sub;
After executing the example it is impossible to delete the group has the rules for the repository objects.
See also: