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

bug: Permission global:edit_default_branch not enforced when loading a schema #4958

Closed
dgarros opened this issue Nov 16, 2024 · 0 comments
Closed
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected

Comments

@dgarros
Copy link
Collaborator

dgarros commented Nov 16, 2024

Component

API Server / GraphQL

Infrahub version

1.0.5

Current Behavior

A user with the global permissions to manage the schema (global:manage_schema:allow_all) but without the permission to edit the default branch (global:edit_default_branch) is still able to load a new schema in the default branch (main)

Expected Behavior

A user without the permission global:edit_default_branch shouldn't be able to load a schema into the default branch

Steps to Reproduce

On a fresh system

  • Create a new user and add it to the group Infrahub Users
  • Validate that the group is associated with the role General Access (default data) and that this role has the global:manage_schema:allow_all but does not have the role global:edit_default_branch
  • Generate a token for this user
  • Try to load a schema with this user account into the default branch using infrahubctl

Additional Information

No response

@dgarros dgarros added type/bug Something isn't working as expected group/backend Issue related to the backend (API Server, Git Agent) labels Nov 16, 2024
@dgarros dgarros closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant