-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a PI exemption environment variable to PBS #916
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,11 +175,21 @@ func TestAllowPersonalInfo(t *testing.T) { | |
} | ||
|
||
// PI needs both purposes to succeed | ||
allowPI, err := perms.PersonalInfoAllowed(context.Background(), openrtb_ext.BidderAppnexus, "BOS2bx5OS2bx5ABABBAAABoAAAABBwAA") | ||
allowPI, err := perms.PersonalInfoAllowed(context.Background(), openrtb_ext.BidderAppnexus, "", "BOS2bx5OS2bx5ABABBAAABoAAAABBwAA") | ||
assertNilErr(t, err) | ||
assertBoolsEqual(t, false, allowPI) | ||
|
||
allowPI, err = perms.PersonalInfoAllowed(context.Background(), openrtb_ext.BidderPubmatic, "BOS2bx5OS2bx5ABABBAAABoAAAABBwAA") | ||
allowPI, err = perms.PersonalInfoAllowed(context.Background(), openrtb_ext.BidderPubmatic, "", "BOS2bx5OS2bx5ABABBAAABoAAAABBwAA") | ||
assertNilErr(t, err) | ||
assertBoolsEqual(t, true, allowPI) | ||
|
||
// Assert that an item that otherwise would not be allowed PI access, gets approved because it is found in the GDPR.NonStandardPublishers array | ||
perms.cfg.NonStandardPublishers = []string{"siteID", "fake-site-id", "appNexusAppID"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd recommend we add only There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean the |
||
perms.cfg.NonStandardPublisherMap = make(map[string]int) | ||
for _, publisher_id := range perms.cfg.NonStandardPublishers { | ||
perms.cfg.NonStandardPublisherMap[publisher_id] = 1 | ||
} | ||
allowPI, err = perms.PersonalInfoAllowed(context.Background(), openrtb_ext.BidderAppnexus, "appNexusAppID", "BOS2bx5OS2bx5ABABBAAABoAAAABBwAA") | ||
assertNilErr(t, err) | ||
assertBoolsEqual(t, true, allowPI) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this var name please be changed to
publisherID
based on Go's naming convention?