-
Notifications
You must be signed in to change notification settings - Fork 760
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 account CCPA enabled and per-request-type enabled flags #1566
Conversation
Manually verified for web, app and amp |
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.
LGTM
config/accounts.go
Outdated
} | ||
|
||
// AccountCCPAIntegration indicates whether CCPA is enabled for each request type | ||
type AccountCCPAIntegration struct { |
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.
Eh. I think AccountCCPA
makes sense, but I wouldn't mind having just one unified AccountIntegration
, or some such. The only downside is it becomes harder to add a CCPA or GDPR specific value.. but we could always split the types then.
config/accounts.go
Outdated
if integrationEnabled := a.IntegrationEnabled.GetByIntegrationType(integrationType); integrationEnabled != nil { | ||
return integrationEnabled | ||
} | ||
if a.Enabled != nil { |
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.
Nitpick: You can just return a.Enabled here. Does't matter if it's nil or not. Comment is great and accurate.
config/accounts.go
Outdated
|
||
if integrationEnabled != nil { | ||
if integrationEnabled := a.IntegrationEnabled.GetByIntegrationType(integrationType); integrationEnabled != nil { | ||
return integrationEnabled | ||
} | ||
if a.Enabled != nil { |
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.
Same nitpick here. Sorry. Seems I missed this the first time around.
Similar to what we are doing for GDPR, as described in issue #1323 and PR #1564, this adds account-level CCPA configuration.
The order of precedence for determining whether CCPA is enabled is the same as for GDPR: