基于Azure DevOps角色的菜单项

时间:2019-03-01 11:49:18

标签: azure-devops azure-devops-rest-api azure-devops-extensions

当前,我已经构建了一个Azure DevOps扩展,其中包含一个菜单项,每个人都可以看到。这不是问题,但是现在我们要隐藏某些页面以显示特定角色。

我只能找到有关设置自定义菜单项的有限信息,而且找不到如何使菜单项基于角色或团队的解决方案。

下面您可以看到我当前的扩展名文件。谁能告诉我如何解决这个问题?

{
    // ...
    "contributions": [
        {
            "id": "xxx-hub-group",
            "type": "ms.vss-web.hub-group",
            "description": "XXX",
            "targets": [
                "ms.vss-web.project-hub-groups-collection"
            ],
            "properties": {
                "name": "XXX",
                "icon": "img/xxx.png"
            }
        },
        {
            "id": "sub-xxx",
            "type": "ms.vss-web.hub",
            "description": "sub-xxx",
            "targets": [
                ".xxx-hub-group"
            ],
            "properties": {
                "name": "sub-xxx",
                "title": "sub-xxx",
                "icon": "img/sub-xxx.png",
                "uri": "pages/sub-xxx.html",
                "supportedScopes": [
                    "project_team"
                ]
            }
        }
    ]
}

0 个答案:

没有答案