Skip to content

Commit effd572

Browse files
author
Junaid-Ashraf-56
committed
Update matrix-auth-plugin docs for v3.2+ syntax
1 parent 3e50e6e commit effd572

1 file changed

Lines changed: 61 additions & 2 deletions

File tree

demos/global-matrix-auth/README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# matrix-auth-plugin
22

3-
Requires `matrix-auth` >= 3.0
3+
Requires `matrix-auth` >= 3.2
4+
> Starting from version 3.2 of the `matrix-auth` plugin, the JCasC syntax for configuring permissions has changed. The previous `permissions:` format is deprecated and replaced with a structured `entries:` format. While older configurations may still work with `deprecated: warn`, it is recommended to migrate to the new format.
45
56
There are a couple of built-in authorizations to consider.
67

@@ -9,6 +10,30 @@ There are a couple of built-in authorizations to consider.
910

1011
## sample-configuration (global matrix)
1112

13+
Updated Configuration:
14+
```yaml
15+
jenkins:
16+
authorizationStrategy:
17+
globalMatrix:
18+
entries:
19+
- user:
20+
name: "admin"
21+
permissions:
22+
- "Overall/Administer"
23+
- user:
24+
name: "anonymous"
25+
permissions:
26+
- "Overall/Read"
27+
- group:
28+
name: "authenticated"
29+
permissions:
30+
- "Overall/Administer"
31+
```
32+
Permissions must be defined **per line**, meaning each line must grant permission to only a single role, and only a single user or group of users.
33+
34+
35+
36+
## Deprecated Configuration (Pre-3.2)
1237
```yaml
1338
jenkins:
1439
authorizationStrategy:
@@ -18,10 +43,44 @@ jenkins:
1843
- "GROUP:Overall/Administer:authenticated"
1944
- "USER:Overall/Administer:admin"
2045
```
21-
Permissions must be defined **per line**, meaning each line must grant permission to only a single role, and only a single user or group of users.
46+
47+
2248
2349
## sample-configuration (project based matrix)
2450
51+
```yaml
52+
jenkins:
53+
authorizationStrategy:
54+
projectMatrix:
55+
entries:
56+
- group:
57+
name: "authenticated"
58+
permissions:
59+
- "View/Delete"
60+
- "View/Read"
61+
- "View/Configure"
62+
- "View/Create"
63+
- "Job/Read"
64+
- "Job/Build"
65+
- "Job/Configure"
66+
- "Job/Create"
67+
- "Job/Delete"
68+
- "Job/Discover"
69+
- "Job/Move"
70+
- "Job/Workspace"
71+
- "Job/Cancel"
72+
- "Run/Delete"
73+
- "Run/Replay"
74+
- "Run/Update"
75+
- "SCM/Tag"
76+
- "Overall/Administer"
77+
- user:
78+
name: "anonymous"
79+
permissions:
80+
- "Overall/Read"
81+
```
82+
83+
## Deprecated Configuration for Project Matrix (Pre-3.2)
2584
```yaml
2685
jenkins:
2786
authorizationStrategy:

0 commit comments

Comments
 (0)