Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RBAC] syncing of repository with a remote requires specifying a remote at sync time #4925

Closed
dkliban opened this issue Jan 15, 2024 · 0 comments

Comments

@dkliban
Copy link
Member

dkliban commented Jan 15, 2024

Version
3.43 and probably earlier

Describe the bug
I have a user that has the permissions to create repositories and remotes. The user created a remote and then created a repository with that remote associated. When the user tries to sync the following error is produced:

Error: {"remote":["This field is required since a remote is not set on the repository."]}

To Reproduce

  1. Create a user that can create rpm remotes and rpm repositories.
  2. pulp rpm remote create --url https://fixtures.pulpproject.org/rpm-alt-layout/ --name rpmfoo
  3. pulp rpm repository create --name rpmfoo --remote rpmfoo
  4. pulp rpm repository sync --name rpmfoo

Additional context
The problem seems to be that the self.context[0] does not have repository_pk when a non-admin user is performing the request.

Domains are enabled on this Pulp instance.

[0] https://github.com/pulp/pulpcore/blob/3.43/pulpcore/app/serializers/repository.py#L346

@dkliban dkliban changed the title syncing of repository with a remote requires specifying a remote at sync time [rbac] syncing of repository with a remote requires specifying a remote at sync time Jan 15, 2024
@dkliban dkliban changed the title [rbac] syncing of repository with a remote requires specifying a remote at sync time [RBAC] syncing of repository with a remote requires specifying a remote at sync time Jan 15, 2024
dkliban added a commit to dkliban/pulpcore that referenced this issue Jan 16, 2024
dkliban added a commit to dkliban/pulpcore that referenced this issue Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant