Skip to content

Commit

Permalink
Second fix for weak vendor enforcement (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhhjort authored Jun 23, 2021
1 parent 9489942 commit e24356f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions gdpr/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func (p *permissionsImpl) AuctionActivitiesAllowed(ctx context.Context,

if id, ok := p.vendorIDs[bidder]; ok {
return p.allowActivities(ctx, id, consent, weakVendorEnforcement)
} else if weakVendorEnforcement {
return p.allowActivities(ctx, 0, consent, weakVendorEnforcement)
}

return p.defaultVendorPermissions()
Expand Down
9 changes: 4 additions & 5 deletions gdpr/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,10 @@ func TestAllowActivitiesGeoAndID(t *testing.T) {
perms := permissionsImpl{
cfg: gdprConfig,
vendorIDs: map[openrtb_ext.BidderName]uint16{
openrtb_ext.BidderAppnexus: 2,
openrtb_ext.BidderPubmatic: 6,
openrtb_ext.BidderRubicon: 8,
openrtb_ext.BidderOpenx: 20,
openrtb_ext.BidderAudienceNetwork: 55,
openrtb_ext.BidderAppnexus: 2,
openrtb_ext.BidderPubmatic: 6,
openrtb_ext.BidderRubicon: 8,
openrtb_ext.BidderOpenx: 20,
},
fetchVendorList: map[uint8]func(ctx context.Context, id uint16) (vendorlist.VendorList, error){
tcf2SpecVersion: listFetcher(map[uint16]vendorlist.VendorList{
Expand Down

0 comments on commit e24356f

Please sign in to comment.