mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
128 stars 41 forks source link

[Bug]: frontend pages display the restricted/blocked page for available versions #15126

Open ioanarusiczki opened 3 weeks ago

ioanarusiczki commented 3 weeks ago

What happened?

followup https://github.com/mozilla/addons/issues/15013

An addon with multiple versions has 2 versions restricted and one is still approved and available. https://reviewers.addons-dev.allizom.org/en-US/reviewers/review/633708

The frontend urls with versions specified displays for the approved version 3.0 that it's been restricted https://addons-dev.allizom.org/en-US/firefox/blocked-addon/%7Bf2fe1fd3-5ad6-45ed-863d-0abfabae74ad%7D/3.0/

(replacing 3.0 with any other version even one that doesn't exist https://addons-dev.allizom.org/en-US/firefox/blocked-addon/%7Bf2fe1fd3-5ad6-45ed-863d-0abfabae74ad%7D/17.0/, it would show the restricted page for this guid)

with no version specified https://addons-dev.allizom.org/en-US/firefox/blocked-addon/%7Bf2fe1fd3-5ad6-45ed-863d-0abfabae74ad%7D/ also shows the restricted page

What did you expect to happen?

a 404 because the specified version does not have a restriction/block

Is there an existing issue for this?

┆Issue is synchronized with this Jira Task

willdurand commented 3 weeks ago

with no version specified addons-dev.allizom.org/en-US/firefox/blocked-addon/%7Bf2fe1fd3-5ad6-45ed-863d-0abfabae74ad%7D also shows the restricted page

that's kinda expected at least

For the two other URLs, we've largely ignored the version in the URL in the past. That said, I think it'd be fine to return a 404 when the version isn't blocked now that we do something useful with the version in the URL.