Uploaded image for project: 'Stash'
  1. Stash
  2. STASH-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.

        Issue Links

          Activity

          Hide
          ted.wood Ted W added a comment -

          Another month, another comment to keep this thing alive.

          Our organization has lost two release branches as a result of "branch permissions" not actually preventing all the methods in which a user can delete a branch. We've installed the "Protect Branches" Plugin, the "Protect Branches with unmerged pull requests" hook and configured the built in branch permissions and yet there is still a way to delete branches via the UI. Please make the branch permissions do what they advertise.

          Show
          ted.wood Ted W added a comment - Another month, another comment to keep this thing alive. Our organization has lost two release branches as a result of "branch permissions" not actually preventing all the methods in which a user can delete a branch. We've installed the "Protect Branches" Plugin, the "Protect Branches with unmerged pull requests" hook and configured the built in branch permissions and yet there is still a way to delete branches via the UI. Please make the branch permissions do what they advertise.
          Hide
          michael.rappazzo Michael Rappazzo added a comment -

          My company found the stash permissions lacking, so I was tasked to write a plugin which has more fined grained permissions. I made it use a syntax similar to gitolite (with RW+CD for permissions, regex branch names, and then user or group association), and added some of my own features. It didn't really take too long, so I would recommend this approach until stash catches up. We have been quite satisfied with this approach. Unfortunately, I can't release the source code at this point because it is a private company resource.

          Show
          michael.rappazzo Michael Rappazzo added a comment - My company found the stash permissions lacking, so I was tasked to write a plugin which has more fined grained permissions. I made it use a syntax similar to gitolite (with RW+CD for permissions, regex branch names, and then user or group association), and added some of my own features. It didn't really take too long, so I would recommend this approach until stash catches up. We have been quite satisfied with this approach. Unfortunately, I can't release the source code at this point because it is a private company resource.
          Hide
          markgillespie Mark Gillespie added a comment -

          @michael.rappazzo

          I'm guessing your plugin also doesn't catch the stash merge delete issue I mentioned either?

          Show
          markgillespie Mark Gillespie added a comment - @michael.rappazzo I'm guessing your plugin also doesn't catch the stash merge delete issue I mentioned either?
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: