Skip to content

split expose_in_reviewer_tools to extensions and themes#25148

Open
eviljeff wants to merge 1 commit into
mozilla:masterfrom
eviljeff:16261-split-expose-in-reviewer-tools-per-addon-type
Open

split expose_in_reviewer_tools to extensions and themes#25148
eviljeff wants to merge 1 commit into
mozilla:masterfrom
eviljeff:16261-split-expose-in-reviewer-tools-per-addon-type

Conversation

@eviljeff

@eviljeff eviljeff commented Jul 15, 2026

Copy link
Copy Markdown
Member

Fixes mozilla/addons#16261

Description

Change expose_in_reviewer_tools from a False/True boolean, to a config to allow a policy to be selectively exposed for extension (actually non-theme) reviews, and theme reviews.

Context

As booleans are stored in mysql as tinyints, the database migration can directly alter the column to smallint without manually migrating the data - i.e. False will become 0, which is our constant for not exposed, and True will become 1, which is our constant for exposed in both extensions and themes.

Testing

  • if you don't have any Cinder policies locally, sync your policies
  • in django admin, change some of the policies to be exposed to both extensions and themes, some to extensions, and some to themes
  • toggle off the waffle switch enable-policy-review-selection or you will hit [Bug]: themes are missing the review sections on review pages addons#16321
  • in reviewer tools, navigate to the review page for an extension, and see only the policies for extensions and both are exposed for rejections and disable addon
  • similarly, for a theme, see only the both and theme policies are available

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.

),
limit_choices_to={'expose_in_reviewer_tools': True},
limit_choices_to={
'expose_in_reviewer_tools__in': POLICY_EXPOSURE.FOR_EXTENSIONS

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.

This is because the scanners only operate over extensions right now

@eviljeff eviljeff marked this pull request as ready for review July 15, 2026 17:16
@eviljeff eviljeff requested review from a team and nothingrandom and removed request for a team July 15, 2026 17:16
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.

[Bug]: Review Tools page exposes CinderPolicies regardless of addon type

1 participant