Commit b2a459e
committed
Fix GRANTED BY support in REVOKE ROLE statements
Commit 6aaaa76 added support for the GRANTED BY clause in GRANT and
REVOKE statements, but missed adding support for checking the role in
the REVOKE ROLE case. Fix by checking that the parsed role matches the
CURRENT_ROLE/CURRENT_USER requirement, and also add some tests for it.
Backpatch to v14 where GRANTED BY support was introduced.
Discussion: https://postgr.es/m/B7F6699A-A984-4943-B9BF-CEB84C003527@yesql.se
Backpatch-through: 141 parent 36cb5e7 commit b2a459e
File tree
4 files changed
+30
-0
lines changed- src
- backend
- commands
- parser
- test/regress
- expected
- sql
4 files changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
1262 | 1263 | | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1263 | 1274 | | |
1264 | 1275 | | |
1265 | 1276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7196 | 7196 | | |
7197 | 7197 | | |
7198 | 7198 | | |
| 7199 | + | |
7199 | 7200 | | |
7200 | 7201 | | |
7201 | 7202 | | |
| |||
7206 | 7207 | | |
7207 | 7208 | | |
7208 | 7209 | | |
| 7210 | + | |
7209 | 7211 | | |
7210 | 7212 | | |
7211 | 7213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
47 | 56 | | |
48 | 57 | | |
49 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
0 commit comments