Conversation
| return permission; | ||
| } | ||
|
|
||
| final List<String> permittedBidders = ListUtils.emptyIfNull(permission.getBidders()); |
There was a problem hiding this comment.
No need for ListUtils.emptyIfNull here
| ? ListUtils.emptyIfNull(extPrebidData.getEidPermissions()) | ||
| : Collections.emptyList(); | ||
|
|
||
| final List<ExtRequestPrebidDataEidPermissions> updatedPermissions = eidPermissions.stream() |
There was a problem hiding this comment.
If there are no incoming EID permissions, you will end up not defining any at all. You should have 2 logic branches:
- create a new permission specifically for your module. You're not doing this right now. This is the most important rule.
- update existing permissions that match your source and inserter (you're doing this now, although incorrectly). This one is less important as the inserter you plan to use is a new thing.
To make things work right now, you can only stick to the first option for the time being: just always add a specific permission for a source + inserter combination with the allowed bidders if your module actually added new EIDs.
| @@ -252,16 +255,24 @@ private ExtRequestPrebidDataEidPermissions restrictEidPermission(ExtRequestPrebi | |||
| return permission; | |||
There was a problem hiding this comment.
You added inserter into each EID your module inserts, but you didn't target it by rule. The idea is to use a combination of source and inserter to make a unique criteria for the rule.
| : ExtRequestPrebidDataEidPermissions | ||
| .builder() | ||
| .bidders(finalBidders) | ||
| : ExtRequestPrebidDataEidPermissions.builder() |
There was a problem hiding this comment.
When updating existing permissions, its a bad idea to recreate them from scratch. Only replace the objects you have updated.
| final List<String> permittedBidders = ListUtils.emptyIfNull(permission.getBidders()); | ||
|
|
||
| if (CollectionUtils.isEmpty(permittedBidders) || permittedBidders.contains("*")) { | ||
| return ExtRequestPrebidDataEidPermissions.builder() |
There was a problem hiding this comment.
When updating existing permissions, its a bad idea to recreate them from scratch. Only replace the objects you have updated.
🔧 Type of changes
✨ What's the context?
Fixing permission logic: empty permissions in bid request are treated as "allow all". A case of * is included.
Fixing liveintent resolution endpoint in the documentation
🧠 Rationale behind the change
Why did you choose to make these changes? Were there any trade-offs you had to consider?
🔎 New Bid Adapter Checklist
🧪 Test plan
How do you know the changes are safe to ship to production?
🏎 Quality check