diff options
author | Zuul <zuul@review.opendev.org> | 2020-07-17 13:55:00 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-07-17 13:55:00 +0000 |
commit | c5fac510f20b1ec9c73c8ea903c79d0757e0d757 (patch) | |
tree | 8a19f73009a31300a407615ad0f287348ae2d7bd /tests | |
parent | fd85f3475473684f71d51547626d4e58d70aa5e3 (diff) | |
parent | 703a76650f746bad713fef55389a616f0067255a (diff) | |
download | python-jenkins-job-builder-master-patches.tar.gz python-jenkins-job-builder-master-patches.tar.xz python-jenkins-job-builder-master-patches.zip |
Merge "Fix Authorization Matrix property - inheritance strategy"master-patches
Diffstat (limited to 'tests')
5 files changed, 31 insertions, 0 deletions
diff --git a/tests/properties/fixtures/authorization.xml b/tests/properties/fixtures/authorization.xml index 06268a05..593dfa84 100644 --- a/tests/properties/fixtures/authorization.xml +++ b/tests/properties/fixtures/authorization.xml @@ -2,6 +2,7 @@ <project> <properties> <hudson.security.AuthorizationMatrixProperty> + <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/> <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:admin</permission> <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:admin</permission> <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:admin</permission> diff --git a/tests/properties/fixtures/authorization_matrix.xml b/tests/properties/fixtures/authorization_matrix.xml index f3fd8177..6404b142 100644 --- a/tests/properties/fixtures/authorization_matrix.xml +++ b/tests/properties/fixtures/authorization_matrix.xml @@ -2,6 +2,7 @@ <project> <properties> <hudson.security.AuthorizationMatrixProperty> + <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/> <permission>hudson.model.Item.Delete:admin</permission> <permission>hudson.model.Item.Configure:admin</permission> <permission>hudson.model.Item.Read:admin</permission> diff --git a/tests/yamlparser/fixtures/auth-jobs/project-in-folder-with-auth-properties2.xml b/tests/yamlparser/fixtures/auth-jobs/project-in-folder-with-auth-properties2.xml new file mode 100644 index 00000000..3669b217 --- /dev/null +++ b/tests/yamlparser/fixtures/auth-jobs/project-in-folder-with-auth-properties2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<project> + <actions/> + <description><!-- Managed by Jenkins Job Builder --></description> + <keepDependencies>false</keepDependencies> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <concurrentBuild>false</concurrentBuild> + <canRoam>true</canRoam> + <properties> + <hudson.security.AuthorizationMatrixProperty> + <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/> + <permission>hudson.model.Item.Build:auser</permission> + </hudson.security.AuthorizationMatrixProperty> + </properties> + <scm class="hudson.scm.NullSCM"/> + <builders/> + <publishers/> + <buildWrappers/> +</project> diff --git a/tests/yamlparser/fixtures/project-in-folder-with-auth-properties2.yaml b/tests/yamlparser/fixtures/project-in-folder-with-auth-properties2.yaml new file mode 100644 index 00000000..8351c473 --- /dev/null +++ b/tests/yamlparser/fixtures/project-in-folder-with-auth-properties2.yaml @@ -0,0 +1,8 @@ +- job: + # folder name specified as part of job name + name: auth-jobs/auth-job-test + project-type: freestyle + properties: + - authorization: + auser: + - job-build diff --git a/tests/yamlparser/fixtures/project-with-auth-properties.xml b/tests/yamlparser/fixtures/project-with-auth-properties.xml index 4d4c1dfb..c02bd8cc 100644 --- a/tests/yamlparser/fixtures/project-with-auth-properties.xml +++ b/tests/yamlparser/fixtures/project-with-auth-properties.xml @@ -14,6 +14,7 @@ <canRoam>true</canRoam> <properties> <hudson.security.AuthorizationMatrixProperty> + <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/> <permission>hudson.model.Item.Build:auser</permission> </hudson.security.AuthorizationMatrixProperty> </properties> |