From 62b26140afa93c2ab36478ed05fae0570e61173f Mon Sep 17 00:00:00 2001 From: Dmitry Burmistrov Date: Wed, 12 Jul 2017 13:36:24 +0400 Subject: [PATCH] Missed Replay property of authorization matrix Add support for Run.Replay property of authorization matrix Change-Id: I1101c6a15a7e9704a3eccf8f194da6280e54d172 --- jenkins_jobs/modules/properties.py | 2 ++ tests/properties/fixtures/authorization.xml | 1 + tests/properties/fixtures/authorization.yaml | 1 + tests/properties/fixtures/authorization_matrix.xml | 1 + tests/properties/fixtures/authorization_matrix.yaml | 1 + 5 files changed, 6 insertions(+) diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py index 59cef4fcb..9a27f2c68 100644 --- a/jenkins_jobs/modules/properties.py +++ b/jenkins_jobs/modules/properties.py @@ -406,6 +406,7 @@ def authorization(registry, xml_parent, data): * **job-workspace** * **ownership-jobs** * **run-delete** + * **run-replay** * **run-update** * **scm-tag** @@ -436,6 +437,7 @@ def authorization(registry, xml_parent, data): 'job-workspace': 'hudson.model.Item.Workspace', 'ownership-jobs': ''.join((ownership, 'Jobs')), 'run-delete': 'hudson.model.Run.Delete', + 'run-replay': 'hudson.model.Run.Replay', 'run-update': 'hudson.model.Run.Update', 'scm-tag': 'hudson.scm.SCM.Tag', } diff --git a/tests/properties/fixtures/authorization.xml b/tests/properties/fixtures/authorization.xml index cf707a3d8..06268a05f 100644 --- a/tests/properties/fixtures/authorization.xml +++ b/tests/properties/fixtures/authorization.xml @@ -18,6 +18,7 @@ hudson.model.Item.Workspace:admin com.synopsys.arc.jenkins.plugins.ownership.OwnershipPlugin.Jobs:admin hudson.model.Run.Delete:admin + hudson.model.Run.Replay:admin hudson.model.Run.Update:admin hudson.scm.SCM.Tag:admin hudson.model.Item.Read:anonymous diff --git a/tests/properties/fixtures/authorization.yaml b/tests/properties/fixtures/authorization.yaml index 3b08fbafd..94b6c34ac 100644 --- a/tests/properties/fixtures/authorization.yaml +++ b/tests/properties/fixtures/authorization.yaml @@ -17,6 +17,7 @@ properties: - job-workspace - ownership-jobs - run-delete + - run-replay - run-update - scm-tag anonymous: diff --git a/tests/properties/fixtures/authorization_matrix.xml b/tests/properties/fixtures/authorization_matrix.xml index bdad6d26d..f3fd81777 100644 --- a/tests/properties/fixtures/authorization_matrix.xml +++ b/tests/properties/fixtures/authorization_matrix.xml @@ -10,6 +10,7 @@ hudson.model.Item.Workspace:admin hudson.model.Item.Cancel:admin hudson.model.Run.Delete:admin + hudson.model.Run.Replay:admin hudson.model.Run.Update:admin hudson.scm.SCM.Tag:admin hudson.model.Item.Discover:anonymous diff --git a/tests/properties/fixtures/authorization_matrix.yaml b/tests/properties/fixtures/authorization_matrix.yaml index 7863e3b60..61dc70ca2 100644 --- a/tests/properties/fixtures/authorization_matrix.yaml +++ b/tests/properties/fixtures/authorization_matrix.yaml @@ -9,6 +9,7 @@ properties: - job-workspace - job-cancel - run-delete + - run-replay - run-update - scm-tag anonymous: