StationsPolicy: IStations;
The StationsPolicy property returns the list of stations that are denied to enter the current repository.
To execute the example, add a link to the Metabase system assembly.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
Policy: IMetabasePolicy;
Lic: Object;
Stat: IStations;
St: IStation;
Begin
MB := MetabaseClass.Active;
// Check out license to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
Policy := MS.Policy;
// Add a new workstation to the list of stations
Stat := Policy.StationsPolicy;
Stat.Refresh;
St := Stat.FindByName("TEST_PC");
St.Access := StationAccessType.Forbidden;
St.Included := True;
// Save changes
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the TEST_PC workstation is added to the list of stations that are denied to enter the current repository.
See also: