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:
Fathi Boudra 2014-06-01 15:59:59 +03:00
parent e07f6e7e69
commit c6c81a2965
3 changed files with 17 additions and 0 deletions

View File

@ -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',

View 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>

View File

@ -0,0 +1,5 @@
properties:
- authorization:
anonymous:
- job-read
- job-extended-read