-
Notifications
You must be signed in to change notification settings - Fork 538
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 Waffle Flag for Submissions #22729
Add Waffle Flag for Submissions #22729
Conversation
Can you refactor the conditions in the views into a decorator or two (one for APIs, one for "regular" views) to reduce duplicated code ? |
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.
I think we should be a little more subtle than that (sorry it was so poorly specified in the issue):
- We don't need to completely block all steps of the submission process. Let's only block the part where the add-on is being submitted, that's what matters - for the rest, it's too late anyway.
- On the page where the developer is selecting the file, let's allow access to the page if it's a
GET
, but disable the inputs/buttons and show the error message there. Or even replace the entire with the message, whatever is easier. That way developers should never be surprised (and in theory shouldn't hit the 403 submissions_disabled.html page, unless they tried to be sneaky or submitted right when the flag was modified)
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.
Wrong button before, didn't mean to approve, definitely need changes.
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.
We can ship this, but create an issue to address these points in a follow-up:
- The Theme Submission page (
/en-US/developers/addon/submit/theme/upload-listed
) has theCreate a theme
button still enabled when the flag is off - The Theme Wizard page (that the aforementioned button leads to -
/en-US/developers/addon/submit/wizard-listed
) also has its submit button still enabled - Some warning should be displayed somewhere on the upload & theme wizard pages and not just on the
title
of the disabled buttons, to make it more obvious. With the fullnote
for consistency.
Fixes: mozilla/addons#1830
Description
Adds waffle flag
enable-submissions
to disable add-on related submissions (both new add-ons and versions) when toggled tofalse
for a particular group on both DevHub and the API. Includes the endpoints:api/v5/addons/addon/
api/v5/addons/addon/<guid>/
api/v5/addons/addon/<guid>/versions/
api/v5/addons/addon/<guid>/previews/
api/v4/addons/
api/v4/addons/<guid>/versions/<version>
api/v3/addons/
api/v3/addons/<guid>/versions/<version>
The waffle flag's 'note' can be used to add additional information. The API response:
And on DevHub:


Testing
enable-submissions
waffle flag (everyone should be =True
by default).Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.