Hello,
when I set branch-permissions for my repository using the REST Api, users are still able to push directly to the branch, even if they shouldn't. In the stash UI, permissions are displayed like they should. When I resave the permissions manually, without making any modifications, the restrictions work as expected. Is this a bug in stash (using the latest version) or do I need to do something to make my changes actually apply?
Oh now I see what I did wrong. I didnt use fully qualified branch names. Instead of refs/head/master I just used "master"
For me this:
curl -i -u user:pass -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d "{\"type\": \"BRANCH\",\"value\": \"refs/heads/something\",\"groups\":[\"Group\"],\"users\":[\"user1\",\"user2\",\"user3\",\"user4\",\"user5\"]}" http://stash/rest/branch-permissions/1.0/projects/PROJECT/repos/REPO/restricted
works perfectly, with Stash 3.5.1
Can you post the exact command and your Stash version?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.