Skip to content

rm PROMOTED_GROUP_CHOICES#25106

Open
eviljeff wants to merge 14 commits into
mozilla:masterfrom
eviljeff:15976-rm-promoted-group-choices-references
Open

rm PROMOTED_GROUP_CHOICES#25106
eviljeff wants to merge 14 commits into
mozilla:masterfrom
eviljeff:15976-rm-promoted-group-choices-references

Conversation

@eviljeff

@eviljeff eviljeff commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fixes mozilla/addons#15976

Description

Removes PROMOTED_GROUP_CHOICES from live and test code. Also drops Addons:RecommendedReview permission.

Context

Almost the last part of removing all constants relating to Promoted groups - with the aim that PromotedGroups can be added and edited freely in production without code changes or migrations.

Almost, because we still need to know what badged group means, without the database; and addons-frontend still has some hard-coded constants controlling the behavior of the groups it knows about.

I made the changes in code, and had claude update the tests.

Testing

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff eviljeff force-pushed the 15976-rm-promoted-group-choices-references branch 2 times, most recently from 657bb5d to 16a4768 Compare July 7, 2026 11:57
@eviljeff eviljeff force-pushed the 15976-rm-promoted-group-choices-references branch from 16a4768 to 8c43966 Compare July 7, 2026 15:06
@eviljeff eviljeff marked this pull request as ready for review July 7, 2026 17:25
@eviljeff eviljeff changed the title 15976 rm promoted group choices references rm PROMOTED_GROUP_CHOICES Jul 7, 2026
@eviljeff eviljeff force-pushed the 15976-rm-promoted-group-choices-references branch from 21c7d2a to ed8041a Compare July 8, 2026 10:36
@eviljeff eviljeff requested review from a team and chrstinalin and removed request for a team July 8, 2026 11:41
STATIC_THEMES_REVIEW = AclPermission('Addons', 'ThemeReview')
# Can review recommend(ed|able) add-ons
ADDONS_RECOMMENDED_REVIEW = AclPermission('Addons', 'RecommendedReview')
# Can triage (and therefore see in the queues) add-ons with a temporary delay

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, is there no need for an equivalent to this (can review add-ons with promotions), or is that going to just fall to admins only?

@eviljeff eviljeff Jul 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the groups are admin_review=True, but the others are any reviewer (not that there's a differentiation at the moment - all reviewers are admin reviewers). This drops Recommended as a being a special group with a dedicated permission

Comment thread src/olympia/constants/promoted.py
Comment thread src/olympia/reviewers/tests/test_views.py
Comment thread src/olympia/reviewers/tests/test_views.py


class TestPromotedGroup(TestCase):
def test_deactived_group_ids_raise(self):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since active is still a field on the model, I don't think this test should be removed wholesale

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was active supposed to be just for the sponsored and verified groups? I assumed it was more generic than that. If it's just for those groups we can drop the model field too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Remove more hard-coded promoted constant references

2 participants