Reputation: 433
I have created Coders User group with object level permission. Group is given Contributor permission for the project. When it comes to specific repository, I have applied object level permission- Like unable to delete a branch. When I verified it, the group is still able to see the Delete Branch option and they are able to delete it.
I have gone through Project Collection level permissions,Project permissions and Object level permissions. Even if we set Deny for Force Push, the group is able to use Delete branch option. So far, I have not seen an option to disable Delete branch option.
Has anyone set it before?
I am updating one more question here, regarding the New Folder in Pipeline. Is there a way to disable this as well for certain user group?
Upvotes: 11
Views: 11958
Reputation: 35194
For question 1 related to repo:
Based on my test, disabling the Force Push Permission indeed can block users deleting the branch.
Users can see the Delete Branch option, but when the user click the delete option, it will show the error message:
For example:
If the users in the Coders Group still can delete the branch, you may need to check the permission for Single user.
For question 1 related to Pipeline:
I am afraid that there is no specific permission to prevent users from deleting the Pipeline folder.
For a workaround, you can create or add an exising Pipeline to the folder and Deny the Delete Build Pipeline Permission.
Then the users will have no access to delete the folder.
Upvotes: 1
Reputation: 637
Regarding your first question about "Delete branch"
One way to achieve that is by setting branch policies. Please see below
Upvotes: 14