forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit371087d
committed
Fix GRANTED BY support in REVOKE ROLE statements
Commit6aaaa76 added support for the GRANTED BY clause in GRANT andREVOKE statements, but missed adding support for checking the role inthe REVOKE ROLE case. Fix by checking that the parsed role matches theCURRENT_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.seBackpatch-through: 141 parent1cc13b8 commit371087d
File tree
4 files changed
+30
-0
lines changed- src
- backend
- commands
- parser
- test/regress
- expected
- sql
4 files changed
+30
-0
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1319 | 1319 |
| |
1320 | 1320 |
| |
1321 | 1321 |
| |
| 1322 | + | |
1322 | 1323 |
| |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1323 | 1334 |
| |
1324 | 1335 |
| |
1325 | 1336 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7181 | 7181 |
| |
7182 | 7182 |
| |
7183 | 7183 |
| |
| 7184 | + | |
7184 | 7185 |
| |
7185 | 7186 |
| |
7186 | 7187 |
| |
| |||
7191 | 7192 |
| |
7192 | 7193 |
| |
7193 | 7194 |
| |
| 7195 | + | |
7194 | 7196 |
| |
7195 | 7197 |
| |
7196 | 7198 |
| |
|
Lines changed: 9 additions & 0 deletions
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 |
| |
|
Lines changed: 8 additions & 0 deletions
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
Comments
(0)