Skip to content

Commit

Permalink
Fix permission prefix for users
Browse files Browse the repository at this point in the history
Fixes #199
  • Loading branch information
fredg02 committed Feb 10, 2022
1 parent abb3e5e commit b894efd
Show file tree
Hide file tree
Showing 24 changed files with 471 additions and 471 deletions.
6 changes: 5 additions & 1 deletion build/gen-permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ EOM
for permObject in $(jq -c "${JQ_PROG} | .[]" "${json}"); do
principal=$(jq -r .principal <<< "${permObject}")
for perm in $(jq -r '.permissions[]' <<< "${permObject}"); do
echo "- \"GROUP:${perm}:${principal}\""
if [[ "${principal}" == *@* ]] || [[ "${principal}" == "anonymous" ]]; then
echo "- \"USER:${perm}:${principal}\""
else
echo "- \"GROUP:${perm}:${principal}\""
fi
done
done
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jenkins:
- "GROUP:View/Delete:foundation-internal.it"
- "GROUP:View/Read:foundation-internal.it"
- "GROUP:Overall/Read:foundation-internal.webdev"
- "GROUP:Overall/Read:[email protected]"
- "USER:Overall/Read:[email protected]"
markupFormatter: rawHtml
crumbIssuer:
standard:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
- "GROUP:View/Delete:foundation-internal.it"
- "GROUP:View/Read:foundation-internal.it"
- "GROUP:Overall/Read:foundation-internal.webdev"
- "GROUP:Overall/Read:[email protected]"
- "USER:Overall/Read:[email protected]"
18 changes: 8 additions & 10 deletions instances/foundation-internal.infra/target/jenkins/plugins.log
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ h2-api 1.4.199
handlebars 3.0.8
handy-uri-templates-2-api 2.1.8-1.0
jackson2-api 2.13.1-246.va8a9f3eaf46a
javadoc 1.6
javadoc 217.v905b_86277a_2a_
javax-activation-api 1.2.0-2
javax-mail-api 1.6.2-5
jdk-tool 1.5
Expand Down Expand Up @@ -77,7 +77,7 @@ pipeline-build-step 2.15
pipeline-graph-analysis 188.v3a01e7973f2c
pipeline-input-step 446.vf27b_0b_83500e
pipeline-maven 3.10.0
pipeline-milestone-step 1.3.2
pipeline-milestone-step 100.v60a_03cd446e1
pipeline-model-api 1.9.3
pipeline-model-definition 1.9.3
pipeline-model-extensions 1.9.3
Expand All @@ -90,13 +90,13 @@ plugin-util-api 2.13.0
popper-api 1.16.1-2
popper2-api 2.11.2-1
prism-api 1.25.0-2
promoted-builds 3.11
promoted-builds 867.v7c3a_b_83a_eb_79
rebuild 1.33
resource-disposer 0.17
run-condition 1.5
scm-api 595.vd5a_df5eb_0e39
script-security 1131.v8b_b_5eda_c328e
simple-theme-plugin 0.7
simple-theme-plugin 103.va_161d09c38c7
snakeyaml-api 1.29.1
sonar 2.14
ssh-agent 1.24.1
Expand All @@ -105,7 +105,7 @@ ssh-slaves 1.33.0
sshd 3.1.0
structs 308.v852b473a2b8c
timestamper 1.17
token-macro 267.vcdaea6462991
token-macro 270.v8c2ce50dc4fc
trilead-api 1.0.13
variant 1.4
warnings-ng 9.11.0
Expand Down Expand Up @@ -192,11 +192,9 @@ workflow-support 813.vb_d7c3d2984a_0
Plugins that will be downloaded:
docker-commons 1.19
docker-workflow 1.28
javadoc 217.v905b_86277a_2a_
kubernetes-cli 1.10.3
mail-watcher-plugin 1.16
slack 602.v0da_f7458945d
token-macro 270.v8c2ce50dc4fc

Resulting plugin list:
ace-editor 1.1
Expand Down Expand Up @@ -280,7 +278,7 @@ pipeline-build-step 2.15
pipeline-graph-analysis 188.v3a01e7973f2c
pipeline-input-step 446.vf27b_0b_83500e
pipeline-maven 3.10.0
pipeline-milestone-step 1.3.2
pipeline-milestone-step 100.v60a_03cd446e1
pipeline-model-api 1.9.3
pipeline-model-definition 1.9.3
pipeline-model-extensions 1.9.3
Expand All @@ -293,13 +291,13 @@ plugin-util-api 2.13.0
popper-api 1.16.1-2
popper2-api 2.11.2-1
prism-api 1.25.0-2
promoted-builds 3.11
promoted-builds 867.v7c3a_b_83a_eb_79
rebuild 1.33
resource-disposer 0.17
run-condition 1.5
scm-api 595.vd5a_df5eb_0e39
script-security 1131.v8b_b_5eda_c328e
simple-theme-plugin 0.7
simple-theme-plugin 103.va_161d09c38c7
slack 602.v0da_f7458945d
snakeyaml-api 1.29.1
sonar 2.14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ data:
- "GROUP:View/Delete:foundation-internal.it"
- "GROUP:View/Read:foundation-internal.it"
- "GROUP:Overall/Read:foundation-internal.webdev"
- "GROUP:Overall/Read:[email protected]"
- "USER:Overall/Read:[email protected]"
markupFormatter: rawHtml
crumbIssuer:
standard:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jenkins:
projectMatrix:
permissions:
- "GROUP:Overall/Administer:admins"
- "GROUP:Overall/Read:anonymous"
- "USER:Overall/Read:anonymous"
- "GROUP:Agent/Build:foundation-internal.webdev"
- "GROUP:Credentials/View:foundation-internal.webdev"
- "GROUP:Gerrit/ManualTrigger:foundation-internal.webdev"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- "GROUP:Overall/Administer:admins"
- "GROUP:Overall/Read:anonymous"
- "USER:Overall/Read:anonymous"
- "GROUP:Agent/Build:foundation-internal.webdev"
- "GROUP:Credentials/View:foundation-internal.webdev"
- "GROUP:Gerrit/ManualTrigger:foundation-internal.webdev"
Expand Down
18 changes: 8 additions & 10 deletions instances/foundation-internal.webdev/target/jenkins/plugins.log
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ h2-api 1.4.199
handlebars 3.0.8
handy-uri-templates-2-api 2.1.8-1.0
jackson2-api 2.13.1-246.va8a9f3eaf46a
javadoc 1.6
javadoc 217.v905b_86277a_2a_
javax-activation-api 1.2.0-2
javax-mail-api 1.6.2-5
jdk-tool 1.5
Expand Down Expand Up @@ -77,7 +77,7 @@ pipeline-build-step 2.15
pipeline-graph-analysis 188.v3a01e7973f2c
pipeline-input-step 446.vf27b_0b_83500e
pipeline-maven 3.10.0
pipeline-milestone-step 1.3.2
pipeline-milestone-step 100.v60a_03cd446e1
pipeline-model-api 1.9.3
pipeline-model-definition 1.9.3
pipeline-model-extensions 1.9.3
Expand All @@ -90,13 +90,13 @@ plugin-util-api 2.13.0
popper-api 1.16.1-2
popper2-api 2.11.2-1
prism-api 1.25.0-2
promoted-builds 3.11
promoted-builds 867.v7c3a_b_83a_eb_79
rebuild 1.33
resource-disposer 0.17
run-condition 1.5
scm-api 595.vd5a_df5eb_0e39
script-security 1131.v8b_b_5eda_c328e
simple-theme-plugin 0.7
simple-theme-plugin 103.va_161d09c38c7
snakeyaml-api 1.29.1
sonar 2.14
ssh-agent 1.24.1
Expand All @@ -105,7 +105,7 @@ ssh-slaves 1.33.0
sshd 3.1.0
structs 308.v852b473a2b8c
timestamper 1.17
token-macro 267.vcdaea6462991
token-macro 270.v8c2ce50dc4fc
trilead-api 1.0.13
variant 1.4
warnings-ng 9.11.0
Expand Down Expand Up @@ -195,12 +195,10 @@ Plugins that will be downloaded:
disable-failed-job 1.15
docker-commons 1.19
docker-workflow 1.28
javadoc 217.v905b_86277a_2a_
kubernetes-cli 1.10.3
mail-watcher-plugin 1.16
openshift-client 1.0.35
slack 602.v0da_f7458945d
token-macro 270.v8c2ce50dc4fc

Resulting plugin list:
ace-editor 1.1
Expand Down Expand Up @@ -286,7 +284,7 @@ pipeline-build-step 2.15
pipeline-graph-analysis 188.v3a01e7973f2c
pipeline-input-step 446.vf27b_0b_83500e
pipeline-maven 3.10.0
pipeline-milestone-step 1.3.2
pipeline-milestone-step 100.v60a_03cd446e1
pipeline-model-api 1.9.3
pipeline-model-definition 1.9.3
pipeline-model-extensions 1.9.3
Expand All @@ -299,13 +297,13 @@ plugin-util-api 2.13.0
popper-api 1.16.1-2
popper2-api 2.11.2-1
prism-api 1.25.0-2
promoted-builds 3.11
promoted-builds 867.v7c3a_b_83a_eb_79
rebuild 1.33
resource-disposer 0.17
run-condition 1.5
scm-api 595.vd5a_df5eb_0e39
script-security 1131.v8b_b_5eda_c328e
simple-theme-plugin 0.7
simple-theme-plugin 103.va_161d09c38c7
slack 602.v0da_f7458945d
snakeyaml-api 1.29.1
sonar 2.14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ data:
projectMatrix:
permissions:
- "GROUP:Overall/Administer:admins"
- "GROUP:Overall/Read:anonymous"
- "USER:Overall/Read:anonymous"
- "GROUP:Agent/Build:foundation-internal.webdev"
- "GROUP:Credentials/View:foundation-internal.webdev"
- "GROUP:Gerrit/ManualTrigger:foundation-internal.webdev"
Expand Down
2 changes: 1 addition & 1 deletion instances/rt.ecf/config.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local permissionsTemplates = import '../../templates/permissions.libsonnet';
permissions+: [
{
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=546758
principal: "mat.booth@redhat.com",
principal: "mat.booth@gmail.com",
grantedPermissions: permissionsTemplates.committerPermissionsList + ["Gerrit/ManualTrigger", "Gerrit/Retrigger"],
}
],
Expand Down
2 changes: 1 addition & 1 deletion instances/rt.ecf/target/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
"Gerrit/ManualTrigger",
"Gerrit/Retrigger"
],
"principal": "mat.booth@redhat.com"
"principal": "mat.booth@gmail.com"
}
],
"plugins": [
Expand Down
46 changes: 23 additions & 23 deletions instances/rt.ecf/target/jenkins/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ jenkins:
projectMatrix:
permissions:
- "GROUP:Overall/Administer:admins"
- "GROUP:Job/Read:anonymous"
- "GROUP:Overall/Read:anonymous"
- "USER:Job/Read:anonymous"
- "USER:Overall/Read:anonymous"
- "GROUP:Job/ExtendedRead:common"
- "GROUP:Agent/Build:mat.booth@redhat.com"
- "GROUP:Credentials/View:mat.booth@redhat.com"
- "GROUP:Gerrit/ManualTrigger:mat.booth@redhat.com"
- "GROUP:Gerrit/Retrigger:mat.booth@redhat.com"
- "GROUP:Job/Build:mat.booth@redhat.com"
- "GROUP:Job/Cancel:mat.booth@redhat.com"
- "GROUP:Job/Configure:mat.booth@redhat.com"
- "GROUP:Job/Create:mat.booth@redhat.com"
- "GROUP:Job/Delete:mat.booth@redhat.com"
- "GROUP:Job/Move:mat.booth@redhat.com"
- "GROUP:Job/Read:mat.booth@redhat.com"
- "GROUP:Job/Workspace:mat.booth@redhat.com"
- "GROUP:Overall/Read:mat.booth@redhat.com"
- "GROUP:Run/Delete:mat.booth@redhat.com"
- "GROUP:Run/Replay:mat.booth@redhat.com"
- "GROUP:Run/Update:mat.booth@redhat.com"
- "GROUP:SCM/Tag:mat.booth@redhat.com"
- "GROUP:View/Configure:mat.booth@redhat.com"
- "GROUP:View/Create:mat.booth@redhat.com"
- "GROUP:View/Delete:mat.booth@redhat.com"
- "GROUP:View/Read:mat.booth@redhat.com"
- "USER:Agent/Build:mat.booth@gmail.com"
- "USER:Credentials/View:mat.booth@gmail.com"
- "USER:Gerrit/ManualTrigger:mat.booth@gmail.com"
- "USER:Gerrit/Retrigger:mat.booth@gmail.com"
- "USER:Job/Build:mat.booth@gmail.com"
- "USER:Job/Cancel:mat.booth@gmail.com"
- "USER:Job/Configure:mat.booth@gmail.com"
- "USER:Job/Create:mat.booth@gmail.com"
- "USER:Job/Delete:mat.booth@gmail.com"
- "USER:Job/Move:mat.booth@gmail.com"
- "USER:Job/Read:mat.booth@gmail.com"
- "USER:Job/Workspace:mat.booth@gmail.com"
- "USER:Overall/Read:mat.booth@gmail.com"
- "USER:Run/Delete:mat.booth@gmail.com"
- "USER:Run/Replay:mat.booth@gmail.com"
- "USER:Run/Update:mat.booth@gmail.com"
- "USER:SCM/Tag:mat.booth@gmail.com"
- "USER:View/Configure:mat.booth@gmail.com"
- "USER:View/Create:mat.booth@gmail.com"
- "USER:View/Delete:mat.booth@gmail.com"
- "USER:View/Read:mat.booth@gmail.com"
- "GROUP:Agent/Build:rt.ecf"
- "GROUP:Credentials/View:rt.ecf"
- "GROUP:Gerrit/ManualTrigger:rt.ecf"
Expand Down
46 changes: 23 additions & 23 deletions instances/rt.ecf/target/jenkins/partials/permissions.hbs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
- "GROUP:Overall/Administer:admins"
- "GROUP:Job/Read:anonymous"
- "GROUP:Overall/Read:anonymous"
- "USER:Job/Read:anonymous"
- "USER:Overall/Read:anonymous"
- "GROUP:Job/ExtendedRead:common"
- "GROUP:Agent/Build:mat.booth@redhat.com"
- "GROUP:Credentials/View:mat.booth@redhat.com"
- "GROUP:Gerrit/ManualTrigger:mat.booth@redhat.com"
- "GROUP:Gerrit/Retrigger:mat.booth@redhat.com"
- "GROUP:Job/Build:mat.booth@redhat.com"
- "GROUP:Job/Cancel:mat.booth@redhat.com"
- "GROUP:Job/Configure:mat.booth@redhat.com"
- "GROUP:Job/Create:mat.booth@redhat.com"
- "GROUP:Job/Delete:mat.booth@redhat.com"
- "GROUP:Job/Move:mat.booth@redhat.com"
- "GROUP:Job/Read:mat.booth@redhat.com"
- "GROUP:Job/Workspace:mat.booth@redhat.com"
- "GROUP:Overall/Read:mat.booth@redhat.com"
- "GROUP:Run/Delete:mat.booth@redhat.com"
- "GROUP:Run/Replay:mat.booth@redhat.com"
- "GROUP:Run/Update:mat.booth@redhat.com"
- "GROUP:SCM/Tag:mat.booth@redhat.com"
- "GROUP:View/Configure:mat.booth@redhat.com"
- "GROUP:View/Create:mat.booth@redhat.com"
- "GROUP:View/Delete:mat.booth@redhat.com"
- "GROUP:View/Read:mat.booth@redhat.com"
- "USER:Agent/Build:mat.booth@gmail.com"
- "USER:Credentials/View:mat.booth@gmail.com"
- "USER:Gerrit/ManualTrigger:mat.booth@gmail.com"
- "USER:Gerrit/Retrigger:mat.booth@gmail.com"
- "USER:Job/Build:mat.booth@gmail.com"
- "USER:Job/Cancel:mat.booth@gmail.com"
- "USER:Job/Configure:mat.booth@gmail.com"
- "USER:Job/Create:mat.booth@gmail.com"
- "USER:Job/Delete:mat.booth@gmail.com"
- "USER:Job/Move:mat.booth@gmail.com"
- "USER:Job/Read:mat.booth@gmail.com"
- "USER:Job/Workspace:mat.booth@gmail.com"
- "USER:Overall/Read:mat.booth@gmail.com"
- "USER:Run/Delete:mat.booth@gmail.com"
- "USER:Run/Replay:mat.booth@gmail.com"
- "USER:Run/Update:mat.booth@gmail.com"
- "USER:SCM/Tag:mat.booth@gmail.com"
- "USER:View/Configure:mat.booth@gmail.com"
- "USER:View/Create:mat.booth@gmail.com"
- "USER:View/Delete:mat.booth@gmail.com"
- "USER:View/Read:mat.booth@gmail.com"
- "GROUP:Agent/Build:rt.ecf"
- "GROUP:Credentials/View:rt.ecf"
- "GROUP:Gerrit/ManualTrigger:rt.ecf"
Expand Down
Loading

0 comments on commit b894efd

Please sign in to comment.