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

Branch Permissions should not prevent push if multiple Restrictions match the target branch, and at least one allows write access to the current user or group

    XMLWordPrintable

Details

    Description

      I just tested this and it was working fine in version 3.9.2.

      The following 2 scenarios can reproduce this after out-of-the-box install of either Stash 3.10.0 or 3.10.2:
      (See comments - Alex Lopez confirmed that the issue is also present in 3.10.3)

      Scenario 1:
      Add 2 branch permissions:
      Pattern * to limit write access to user1
      Pattern feature/* to limit write access to user2

      After adding these 2 permissions, the expected behavior is for user2 to have write access to feature/123, but instead the following error is shown

      remote: Branch refs/heads/feature/123 is read-only.
      remote: Check your branch permissions configuration with the project administrator.

      Scenario 2:
      Add 2 branch permissions:
      Pattern branch* to limit write access to user1
      Pattern branch1* to limit write access to user2

      Expected behavior is for user2 to be able to write to branch123, but instead we get the "read-only" error here too.

      Attachments

        1. screenshot-1.png
          screenshot-1.png
          116 kB
        2. screenshot-2.png
          screenshot-2.png
          98 kB

        Issue Links

          Activity

            People

              fhaehnel Felix
              a7d8cf71caed Pavel Chernikov
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: