[英]Azure devops, how to I find all users and groups who have permission to delete a repository?
Well one way could be to go to the project setting and then click repository and then一种方法可能是 go 到项目设置,然后单击存储库,然后
But that's quite a manual process.但这是一个相当手动的过程。 I am looking for a azure CLI or rest api on which I can query and it gives me back the results.
我正在寻找可以查询的 azure CLI 或 rest api 并返回结果。 Something like SQL: find all users on repository=xyz where permission=delete
像 SQL 之类的东西:在存储库 = xyz 上找到所有用户,其中权限 = 删除
The intent is to create a periodic audit process.目的是创建一个定期审计过程。
But that's quite a manual process.
但这是一个相当手动的过程。 I am looking for a azure CLI or rest api on which I can query and it gives me back the results.
我正在寻找可以查询的 azure CLI 或 rest api 并返回结果。
I am afraid we could not achieve it by rest api at this moment.恐怕我们目前无法通过 rest api 实现它。
That because there is no such REST API to set version control permissions (including git repo).那是因为没有 REST API 来设置版本控制权限(包括 git repo)。 There is a user voice about it on our main forum for product suggestions:
在我们的产品建议主论坛上有一个用户的声音:
Set version control permissions by REST API 通过 REST API 设置版本控制权限
You could vote and add your comments for this feedback.您可以对此反馈进行投票并添加您的评论。 When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously.
当有足够多的社区对此反馈进行投票并添加评论时,产品团队成员将认真对待此反馈。
Even if we have that API, there is still a long way to go to complete it.即使我们有API,距离go还有很长的路要走。 First, we need to traverse all the eligible groups and users according to the condition
Delete repository=Allow
, then filter the groups from the result of the traversal, and call the API according to the filtered group ID to get the users in the group.首先,我们需要根据条件
Delete repository=Allow
遍历所有符合条件的组和用户,然后从遍历结果中过滤组,根据过滤后的组 ID 调用 API 获取组中的用户。 Last, we still have to merge those duplicate user names.最后,我们仍然需要合并那些重复的用户名。 So, this should be a long way to do it.
所以,这应该是一个很长的路要走。
Hope this helps.希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.