Stations: IStations;
The Stations property returns the collection containing the list of workstations, from which user access is granted.
Executing the example requires a form with the Button1 button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Sec: IMetabaseSecurity;
m_User: IMetabaseUser;
dm: IDomain;
Begin
MB := MetabaseClass.Active;
Sec := MB.Security;
m_User := Sec.ResolveName("ADMIN") As IMetabaseUser;
dm := m_User.Stations.Domains.Add("PROGNOZ");
dm.Stations.Add("1C");
Sec.Apply;
End Sub Button1OnClick;
By default the user can access the system from any workstation, IP and MAC-addresses. On clicking the button the ADMIN user is granted the access only from the "1C" workstation, that is located in the PROGNOZ domain.
See also: