has_required_repo_perms_on_upload should check on a content permission instead of is_superuser
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
We want to be able to define roles that allow users to upload content without specifying a target repository. For this the global permission check has_required_repo_perms_on_upload should allow to specify a content view permission that translates to seeing all content including orphans that will not require to specify the repository.
Alternate Idea
Suggest plugins to add this permission in an or-statement.
(has_perm(view_content) and repo_not_specified()) or has_required_repo_perms_on_upload(modify_repository).
Additional context
https://github.com/pulp/pulpcore/blob/main/pulpcore/app/global_access_conditions.py#L401
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pulpcore/app/global_access_conditions.py at the has_required_repo_perms_on_upload implementation referenced in the issue. Review the requested content-view permission behavior and the alternate plugin-based or-statement proposal before deciding which approach is intended. Done means uploads without a target repository are permitted for the agreed role while existing repository permission checks remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100