forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite3ce2de
committed
Allow grant-level control of role inheritance behavior.
The GRANT statement can now specify WITH INHERIT TRUE or WITHINHERIT FALSE to control whether the member inherits the grantedrole's permissions. For symmetry, you can now likewise writeWITH ADMIN TRUE or WITH ADMIN FALSE to turn ADMIN OPTION on or off.If a GRANT does not specify WITH INHERIT, the behavior based onwhether the member role is marked INHERIT or NOINHERIT. This meansthat if all roles are marked INHERIT or NOINHERIT before any rolegrants are performed, the behavior is identical to what we had before;otherwise, it's different, because ALTER ROLE [NO]INHERIT now onlychanges the default behavior of future grants, and has no effect onexisting ones.Patch by me. Reviewed and testing by Nathan Bossart and Tushar Ahuja,with design-level comments from various others.Discussion:http://postgr.es/m/CA+Tgmoa5Sf4PiWrfxA=sGzDKg0Ojo3dADw=wAHOhR9dggV=RmQ@mail.gmail.com1 parent2059c5e commite3ce2de
File tree
15 files changed
+385
-115
lines changed- doc/src/sgml
- ref
- src
- backend
- commands
- parser
- tcop
- utils/adt
- bin/pg_dump
- include
- catalog
- commands
- nodes
- test/regress
- expected
- sql
15 files changed
+385
-115
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1717 | 1717 |
| |
1718 | 1718 |
| |
1719 | 1719 |
| |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
1720 | 1730 |
| |
1721 | 1731 |
| |
1722 | 1732 |
| |
|
Lines changed: 18 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
136 |
| - | |
137 |
| - | |
138 |
| - | |
139 |
| - | |
140 |
| - | |
141 |
| - | |
142 |
| - | |
143 |
| - | |
144 |
| - | |
145 |
| - | |
146 |
| - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
147 | 154 |
| |
148 | 155 |
| |
149 | 156 |
| |
|
Lines changed: 24 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
259 | 269 |
| |
260 | 270 |
| |
261 | 271 |
| |
| |||
265 | 275 |
| |
266 | 276 |
| |
267 | 277 |
| |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
268 | 290 |
| |
269 | 291 |
| |
270 | 292 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
128 |
| - | |
| 128 | + | |
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
209 | 216 |
| |
210 | 217 |
| |
211 | 218 |
| |
|
0 commit comments
Comments
(0)