authorization property: add extended read support
This authorization requires the extended read permission plugin: https://wiki.jenkins-ci.org/display/JENKINS/Extended+Read+Permission+Plugin Include test for the authorization properties. Change-Id: I9364524398f4e3f0d6ccccd88d5046e7504e2123 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
This commit is contained in:
parent
e07f6e7e69
commit
c6c81a2965
@ -287,6 +287,7 @@ def authorization(parser, xml_parent, data):
|
||||
job-delete
|
||||
job-configure
|
||||
job-read
|
||||
job-extended-read
|
||||
job-discover
|
||||
job-build
|
||||
job-workspace
|
||||
@ -313,12 +314,14 @@ def authorization(parser, xml_parent, data):
|
||||
anonymous:
|
||||
- job-discover
|
||||
- job-read
|
||||
- job-extended-read
|
||||
"""
|
||||
|
||||
mapping = {
|
||||
'job-delete': 'hudson.model.Item.Delete',
|
||||
'job-configure': 'hudson.model.Item.Configure',
|
||||
'job-read': 'hudson.model.Item.Read',
|
||||
'job-extended-read': 'hudson.model.Item.ExtendedRead',
|
||||
'job-discover': 'hudson.model.Item.Discover',
|
||||
'job-build': 'hudson.model.Item.Build',
|
||||
'job-workspace': 'hudson.model.Item.Workspace',
|
||||
|
9
tests/properties/fixtures/authorization.xml
Normal file
9
tests/properties/fixtures/authorization.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<hudson.security.AuthorizationMatrixProperty>
|
||||
<permission>hudson.model.Item.Read:anonymous</permission>
|
||||
<permission>hudson.model.Item.ExtendedRead:anonymous</permission>
|
||||
</hudson.security.AuthorizationMatrixProperty>
|
||||
</properties>
|
||||
</project>
|
5
tests/properties/fixtures/authorization.yaml
Normal file
5
tests/properties/fixtures/authorization.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
properties:
|
||||
- authorization:
|
||||
anonymous:
|
||||
- job-read
|
||||
- job-extended-read
|
Loading…
Reference in New Issue
Block a user