Remove ambiguous warnings from matrix-auth plugin by setting authorization type in groovy file processed by the job-dsl plugin

Viewed 201

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.

1 Answers

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.

Related