cribeiro84 / azure-devops-pull-request-hub

Azure DevOps Pull Request Manager Hub
MIT License
60 stars 35 forks source link

Git 'GenericRead' permission error on all accounts using a repo and trying to use this tool... #232

Closed lahardner closed 2 years ago

lahardner commented 2 years ago

Describe the bug Error on loading ADO URL

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dev.azure.com/NAME/PROJECTNAME/_apps/hub/caribeiro84.pull-request-manager-hub.view page
  2. See error " There was an error during the extension load: TFS.WebApi.Exception: TF401027: You need the Git 'GenericRead' permission to perform this action. Details: identity '707f62ca-9aa8-4979-b049-9955a6e92160\MYEMAIL', scope 'repository'.

Expected behavior Load the tool?

Desktop (please complete the following information):

Additional context Sorry, I know this is probably something dumb, but multiple accounts that have full privileges and admin in ADO to the repo cannot load this tool. Installed today and really hoped it would help. Any help debugging this is super appreciated, thank you.

cribeiro84 commented 2 years ago

Thanks @lahardner for raising this issue. This kind of error is related to disabled repository. Could you confirm if the repo in the error is disabled?

lahardner commented 2 years ago

Repo isn't disabled. I've been able to get one other person who can load the same page without issue, seemingly same permissions as mine.

I've also tried clearing browser cache.

Thanks for the quick reply (and apologies for the delay on my side)...anything else you can think of that I should try?

cribeiro84 commented 2 years ago

Thanks @lahardner for replying back. How many repos do you have on the list? Would you be able to check on your Developer Tools (F12) > Network tab the list of repos is being retrieved and if any of the items has a repo with isDisabled = true? Also compare the same with your colleague that's working.

Many thanks

lahardner commented 2 years ago

There's 11 repos on the list though I only have one checked...I think it's querying all of them though and one is failing...if I look at the Network tab I can see the 403 failure on one of the requests but I can't quite tell which repo is the culprit (or how to remove it?)

Edit: apologies, there's about 11 projects on the list and one was chosen. No repos were selected, but if I check only one (not disabled) it still fails (I assume still querying all of them)

cribeiro84 commented 2 years ago

One of the calls usually returns the list of repos and then I call for each repo another API to capture its branches, that's probably where it's failing. Back then when I was developing it, I couldn't find a way to filter out disabled repos, I've tried manually but it's probably failing again. 🥴

lahardner commented 2 years ago

Ahhh, one of those. I was able to go through all the repos and find it manually and update permissions so now it works, thank you so much!