Pull request: home: fix client blocked svcs

Merge in DNS/adguard-home from fix-blocked-svcs to master

Squashed commit of the following:

commit 7e4ccbeb8866501c8f488efa76f7ce32369416ec
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 30 16:48:27 2022 +0300

    all: imp log of changes

commit 171836fb8033ac1b7fc3ed3f4bd18669795fe1dd
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 30 16:22:07 2022 +0300

    all: log changes

commit f5cde0a75a84b8efe59154ad019846ea06ec7c08
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Sep 30 16:04:14 2022 +0300

    home: fix client blocked svcs
This commit is contained in:
Eugene Burkov 2022-09-30 16:57:33 +03:00
parent 4d404b887f
commit 2ffea605cf
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,7 @@ and this project adheres to
### Fixed ### Fixed
- User-specific blocked services not applying correctly.
- `only application/json is allowed` errors in various APIs ([#4970]). - `only application/json is allowed` errors in various APIs ([#4970]).
[#4970]: https://github.com/AdguardTeam/AdGuardHome/issues/4970 [#4970]: https://github.com/AdguardTeam/AdGuardHome/issues/4970
@ -39,7 +40,6 @@ See also the [v0.107.15 GitHub milestone][ms-v0.107.15].
--> -->
## [v0.107.14] - 2022-09-29 ## [v0.107.14] - 2022-09-29
See also the [v0.107.14 GitHub milestone][ms-v0.107.14]. See also the [v0.107.14 GitHub milestone][ms-v0.107.14].

View File

@ -244,6 +244,10 @@ func (clients *clientsContainer) addFromConfig(objects []*clientObject) {
} }
} }
if cli.BlockedServices == nil && cli.UseOwnBlockedServices {
cli.BlockedServices = []string{}
}
for _, t := range o.Tags { for _, t := range o.Tags {
if clients.allTags.Has(t) { if clients.allTags.Has(t) {
cli.Tags = append(cli.Tags, t) cli.Tags = append(cli.Tags, t)