Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13523

Having branch permissions on both project and repository level causes repository level permissions to be ignored

    XMLWordPrintable

Details

    Description

      Issue Summary

      Having branch permissions on both project and repository level causes repository level permissions to be ignored when there is an exemption on project level branch permissions.

      This is reproducible on Data Center: yes

      Steps to Reproduce

      • Go to a repository and create a feature branch named as test-branch
      • Go to Project settings -> Branch permissions -> Add permissions
        Select Branch pattern  feature/ and add the following restrictions with an exempted user:
        • Prevent deletion (exempted user: user-a)
        • Prevent changes without a pull request (exempted user: user-a)
        • Prevent all changes (exempted user: user-a)
      • Go to Repository settings -> Branch permissions  -> Add permissions
        Select Branch name(feature/test-branch) and add the following restrictions:
        • Prevent deletion (no exemption)
        • Prevent changes without a pull request (no exemption)
        • Prevent all changes (no exemption)

      As a summary branch permissions will look like as in the following:

      Expected Results

      When logged in with the user user-a, with the branch permissions above(both with project and repository level branch permissions), user-a should not be able to delete the branch feature/test-branch .

      Actual Results

      The user user-a can delete the branch feature/test-branch.

      Workaround

      After removing Prevent deletion (exempted user: user-a) from project level branch permissions, user-a can not delete the branch feature/test-branch as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            c12e179f0af5 R Arda Duman (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: