mdn / kuma

The project that powers MDN.
https://developer.mozilla.org
Mozilla Public License 2.0
1.93k stars 679 forks source link

Fix subscriber status being ignored when updating collections #8059

Closed Guyzeroth closed 2 years ago

caugner commented 2 years ago

@Guyzeroth Can you shortly explain in 1-2 sentences what problem this solves?

Guyzeroth commented 2 years ago

@Guyzeroth Can you shortly explain in 1-2 sentences what problem this solves?

Hello. The subscription_limit_reached flag is used to determine if the user can save more collection items (without a paid subscription this is 5 items. As the delete is also considered an update this flag needs to be set each time the call is made to tell the client if the limit banner should be displayed. The problem was the is_subscriber status wasn't factored in. It now is (not is_subscriber) will always be false when subscribed.

schalkneethling commented 2 years ago

lgtm. Previously everyone had a 5 collection size limit. After this change, only non-subscribers will have the limit enforced.