Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-2507

Add permission to disable branch and tag deletion via git push

    Details

      Description

      It would be useful to have a separate permission to disable branch and tag deletion done via git push.

      Ideally, this would be controlled independently of any permissions to delete branches and tags from the Stash web interface and is just intended to prevent accidental git push branch deletions.

        Attachments

          Issue Links

            Activity

            Hide
            michael.rappazzo Michael Rappazzo added a comment -

            I don't believe my plugin does that, but If I am not mistaken the plugin api would allow you to intercept that type of event.

            Show
            michael.rappazzo Michael Rappazzo added a comment - I don't believe my plugin does that, but If I am not mistaken the plugin api would allow you to intercept that type of event.
            Hide
            fhaehnel Felix Haehnel added a comment -

            Starting with Stash 3.10.0 branch permissions can now "Prevent branch deletion". This will prevent deleting the branch both in the Stash UI as well as via pushes.

            Show
            fhaehnel Felix Haehnel added a comment - Starting with Stash 3.10.0 branch permissions can now "Prevent branch deletion". This will prevent deleting the branch both in the Stash UI as well as via pushes.
            Hide
            xabierdavila Xabier Davila added a comment -

            I'm disappointed this issue has been closed without fixing the tag deletion issue.
            I'm using Stash 3.11.1 and still can delete tags via

            git push origin :refs/tags/foo-1.2.3
            
            Show
            xabierdavila Xabier Davila added a comment - I'm disappointed this issue has been closed without fixing the tag deletion issue. I'm using Stash 3.11.1 and still can delete tags via git push origin :refs/tags/foo-1.2.3
            Hide
            rbarnes Roger Barnes added a comment -

            Hi Xabier Davila,

            I've linked to a related issue where we'll track the suggestion for better tag protection: STASH-3794.

            In the meantime, it is already possible to protect tags by using a branch pattern match and explicitly entering a pattern using the full ref form, eg: refs/tags/foo-*

            We'll get this fixed up in the documentation.

            Show
            rbarnes Roger Barnes added a comment - Hi Xabier Davila , I've linked to a related issue where we'll track the suggestion for better tag protection: STASH-3794 . In the meantime, it is already possible to protect tags by using a branch pattern match and explicitly entering a pattern using the full ref form, eg: refs/tags/foo-* We'll get this fixed up in the documentation.
            Hide
            timmch Christopher Timm added a comment -

            The tag protection as part of branch protection is documented here:
            https://confluence.atlassian.com/stash/branch-permission-patterns-313461041.html
            A refernce to this documentation should suffice for now, as it provides a valid workaround, which we already use successfully.

            Show
            timmch Christopher Timm added a comment - The tag protection as part of branch protection is documented here: https://confluence.atlassian.com/stash/branch-permission-patterns-313461041.html A refernce to this documentation should suffice for now, as it provides a valid workaround, which we already use successfully.

              People

              • Assignee:
                Unassigned
                Reporter:
                savviness Jesse Johnson
              • Votes:
                94 Vote for this issue
                Watchers:
                84 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: