askwizard
askwizard

Reputation: 127

How can I restrict a user permission to contribute in only one repository in AzureDevOps

I wanted to restrict a user to only one repository in AzureDevOps, the user has basic permissions at the project level. I have also given the user contribute access to that specific repository. The user is not part of any other group.

Upvotes: 2

Views: 1250

Answers (2)

LoLance
LoLance

Reputation: 28096

How can I restrict a user permission to contribute in only one repository in AzureDevOps

We can go Project Settings=>Repositories=>choose repos you want to protect, search the user you want to limit, and deny the Contribute-related permissions one by one:

enter image description here

enter image description here

We can even deny the Read permission so that the user can't view specific repos. Here's a blog for this topic.

PS: If you have 5 repos(A.B.C.D.E) and you want to restrict the user to only one repository(C), you have to set the permissions for A,B,D,E one by one.

Upvotes: 1

Prasun
Prasun

Reputation: 103

To restrict user access to specific Repo, there are many ways. Irrespective user has Basic access at the Org level he/she must be part of the project role to access repo. By default below roles have access to all repo across projects enter image description here

Hence either add a user to any other role from the above list and add that role to that particular repository permissions

Another option is to create a custom role and the user to that role and add a role to repository permission.

Or if the user is not part of the above roles, the user can also be given repo access directly

Method Go to Project >> Project settings(at bottom left corner) >> go to repository settings as below enter image description here

enter image description here

In the search box enter username and add the user

Upvotes: 0

Related Questions