pulp / pulp/pulpcore

I want to create a domain and have all `_creator` permissions assigned at the domain level

Open
#4,919 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Assume I have a non-admin user, e.g. named user, who has permissions enough to create a domain
  2. Have that user create the domain foo
  3. I have the RPM plugin installed
  4. I want the user foo to automatically receive all _creator permissions

What I imagine the solution to be

I don't think so. The closest I think we can get is to:

  1. Create a new custom Role containing the permissions we want assigned at the domain level. For example a new role called RPMAdmin and it gets the 6 RPM add permissions for the RPMRemote, RPMRepository, etc...
  2. Have the DomainAccessPolicy creation_hooks get a new hook on the installation which assigns the RPMAdmin role 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.