Skip to content

bug: Add rebase_branch global permission for non-admin users #8050

Description

@minitriga

Component

Backend

Infrahub version

1.6.2

Current Behavior

Currently, non-admin users cannot perform branch rebase operations even when they have been granted merge_branch and merge_proposed_change permissions. This is because there is no dedicated rebase_branch global permission - rebase operations are restricted to users with super_admin only.

  • Users with global:merge_branch:allow_all permission can merge branches
  • Users with global:merge_proposed_change:allow_all permission can merge proposed changes
  • Rebase operations require super_admin permission - there is no granular permission for rebase

Expected Behavior

A new global permission rebase_branch should be available, allowing administrators to grant rebase capabilities to non-admin users without requiring full super_admin access.

Steps to Reproduce

  1. Create a non-admin user account

    • Navigate to Admin > Role Management > Accounts
    • Create a new user (e.g., testuser)
  2. Create a role with branch permissions

    • Navigate to Admin > Role Management > Roles
    • Create a new role (e.g., branch-operator)
    • Assign the following global permissions:
      • global:merge_branch:allow_all
      • global:merge_proposed_change:allow_all
  3. Assign the role to the user

    • Create a group and add the user to it
    • Assign the branch-operator role to the group
  4. Login as the non-admin user

    • Logout from admin account
    • Login with the testuser credentials
  5. Create a branch and attempt to rebase

    • Create a new branch (e.g., test-branch)
    • Make some changes on the branch
    • Attempt to rebase the branch onto main
  6. Observe the error

    • The rebase operation fails with a permission denied error
    • The user cannot rebase despite having merge permissions

Additional Information

No response

Metadata

Metadata

Assignees

Labels

type/bugSomething isn't working as expected

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions