I want to create a domain and have all `_creator` permissions assigned at the domain level
Open
Nobody has claimed this yet.
Feature
services
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
Use case
- Assume I have a non-admin user, e.g. named
user, who has permissions enough to create a domain - Have that user create the domain
foo - I have the RPM plugin installed
- I want the user
footo automatically receive all_creatorpermissions
What I imagine the solution to be
I don't think so. The closest I think we can get is to:
- Create a new custom Role containing the permissions we want assigned at the domain level. For example a new role called
RPMAdminand it gets the 6 RPMaddpermissions for the RPMRemote, RPMRepository, etc... - Have the DomainAccessPolicy
creation_hooksget a new hook on the installation which assigns theRPMAdminrole to the user creating the domain as a "domain-level" Role.
Can we do this today?
No, because there isn't a code function I can use to configure as the target of the creation_hooks. I would need to provide custom code.
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 DomainAccessPolicy and the creation_hooks definition in pulpcore/app/viewsets/domain.py around line 81, then review how domain-level roles and _creator permissions are represented. Determine how an installation could configure a hook that assigns a custom role to the user creating a domain; done means the behavior can be configured without custom code.
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
- Mostly clear
- Newbie friendliness
- 35/100