RemoveSubject(Subj: ISecuritySubject): Boolean;
Subj. Security subject to be removed.
The RemoveSubject method removes the security subject sent by the Subj parameter.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
SS: ISecuritySubject;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Remove group of users
SS := MS.Groups.Item(MS.Groups.Count - 1);
MS.RemoveSubject(SS);
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the last group of users created in the security manager of the current repository is removed.
See also: