add dedicated source permission (& extra django admin view perms) #24168
+35
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#15929
Description
The main change is source downloads now have a dedicated permission - enforced in the download view, and used to gate the link in the reviewer tools. Additionally 2 additional view-only permissions have been added to django admin.
Context
I've asked in the issue if a migration is needed to add the new permission to existing groups. Adding it manually is pretty easy too.
Testing
*:*)*:*Addons:ReviewAddons:SourceDownload; loginNew django admin permissions
Testing isn't usually isn't necessary, but if you want,
Addons:AdminViewfor viewing Addons in django admin (read-only view only)Collections:AdminViewfor view Collections in django admin (read-only view only)Checklist
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.