Skip to content

Commit 089735b

Browse files
authored
Merge pull request #38612 from kelbrown20/disabling-access-to-build-1923869
BZ:1923869 - Fixing yaml that shows how to disable build strategy
2 parents ebf9472 + 25f8013 commit 089735b

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

modules/builds-disabling-build-strategy-globally.adoc

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ $ oc edit clusterrole admin
6060
$ oc edit clusterrole edit
6161
----
6262

63-
. For each role, remove the line that corresponds to the resource of the strategy to disable.
63+
. For each role, specify the subresources that correspond to the resource of the strategy to disable.
6464

6565
.. Disable the docker Build Strategy for *admin*:
6666
+
@@ -70,12 +70,23 @@ kind: ClusterRole
7070
metadata:
7171
name: admin
7272
...
73-
rules:
74-
- resources:
75-
- builds/custom
76-
- builds/docker <1>
73+
- apiGroups:
74+
- ""
75+
- build.openshift.io
76+
resources:
77+
- buildconfigs
78+
- buildconfigs/webhooks
79+
- builds/custom <1>
7780
- builds/source
78-
...
81+
verbs:
82+
- create
83+
- delete
84+
- deletecollection
85+
- get
86+
- list
87+
- patch
88+
- update
89+
- watch
7990
...
8091
----
81-
<1> Delete this line to disable docker builds globally for users with the *admin* role.
92+
<1> Add `builds/custom` and `builds/source` to disable docker builds globally for users with the *admin* role.

0 commit comments

Comments
 (0)