通过在 job-dsl 插件处理的 groovy 文件中设置授权类型,从 matrix-auth 插件中删除不明确的警告

发布于 2025-01-15 11:13:57 字数 173 浏览 2 评论 0原文

现在,在授予用户或组访问项目的权限时,matrix-auth 3.1 插件需要授权类型。来自插件的警告,“...建议将所有不明确的条目替换为明确是用户或组的条目。” job-dsl 插件中有一个选项可以显式设置授权类型吗?我正在使用最新版本的 job-dsl 插件,但我没有找到更新 groovy 文件的方法,因此我们看不到该警告。

The matrix-auth 3.1 plugin now requires an Authorization type when granting users or group access to a project. Warning from plugin, "... it is recommended that all ambiguous entries are replaced with ones that are either explicitly a user or group." Is there an option in the job-dsl plugin to explicitly set the authorization type? I am using the latest version of the job-dsl plugin and I don't see a way to update the groovy files so that we are not seeing that warning.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

手心的海 2025-01-22 11:13:57

我使用以下方法让它工作:

        properties {
            authorizationMatrix {
            permissions([
                "GROUP:Job/Read:authenticated",
                "GROUP:Job/Build:<your github org>*<your github group>",
                "GROUP:Job/Cancel:<your github org>*<your github group>"
            ])
            inheritanceStrategy {
                nonInheriting()
            }
        }

摆脱授权块的使用,转而使用上述方法。

I have it working using the following:

        properties {
            authorizationMatrix {
            permissions([
                "GROUP:Job/Read:authenticated",
                "GROUP:Job/Build:<your github org>*<your github group>",
                "GROUP:Job/Cancel:<your github org>*<your github group>"
            ])
            inheritanceStrategy {
                nonInheriting()
            }
        }

Get rid of the use of the authorization block in favour of the above.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文