IMetabaseSecurity.RemoveSubject

Syntax

RemoveSubject(Subj: ISecuritySubject): Boolean;

Parameters

Subj. Security subject to be removed.

Description

The RemoveSubject method removes the security subject passed by the Subj parameter.

Example

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:

IMetabaseSecurity