Microsoft Internet Security and Acceleration Server 2000 |
A new user can be added to ISA through administration COM objects, as shown in the topic, Adding Internet Access for New Users. You can also apply rules to a new-user account by means of the objects. One way to control Internet access is with protocol rules. A protocol rule defines a set of protocols that are allowed to certain users at certain times. These times are defined by a schedule. Unlike site and content rules, protocol rules always define what is allowed rather than what is forbidden.
The following example adds a new user and applies the site and content rule "Workday Site Restriction" to the new ISA account.
Dim objFPC As New FPCLib.FPC ' get site and content rule Dim MySiteAndContentRules As FPCSiteAndContentRules Dim MySiteAndContentRule As FPCSiteAndContentRule Set MySiteAndContentRules = objFPC.Arrays.GetContainingArray.ArrayPolicy.SiteAndContentRules Set MySiteAndContentRule = MySiteAndContentRules.Item("Workday Site Restriction") ' add new user Dim MyFPCFPCAccounts As FPCAccounts Dim MyNewFPCAccount As FPCAccount ' AppliesToAccounts returns accounts collection for this rule Set MyFPCAccounts = MySiteAndContentRule.AppliesToAccounts MySiteAndContentRule.AppliesToMethod = fpcAppliesToUsers ' add new account to collection Set MyNewFPCAccount = MyFPCAccounts.Add("REDMOND\USER", fpcInclude) ' added rule will apply to new user ' save your changes MySiteAndContentRule.Save
The following code applies this site and content rule to the new account using the schedule "Extended Work Hours":
MySiteAndContentRule.SetSchedule "Extended Work Hours", fpcArrayScope MySiteAndContentRule.Save ' save your changes
See the topic Add a Schedule for an example of adding the schedule "Extended Work Hours".
FPCAccount, FPCSiteAndContentRule