Commit 6053d00
committed
refactor(master): allow ACL ops in KV backends
Thread FilesystemOperationContext through all ACL methods
(deleteAcl, setAcl, getAcl, applySetAcl, applySetRichAcl)
in both IFilesystemNodeOperations and IFilesystemOperations,
removing the internal transaction creation that was hardcoded
inside each FilesystemOperationsBase method body.
Callers (matoclserv, restore) now own the transaction lifecycle,
enabling KV backends to participate in ACL operations as part
of a single coordinated transaction.
Introduce a protected virtual `getAclForAccess()` method to
abstract ACL retrieval inside `access()`. The default in-memory
implementation reads from `aclStorage`; KV backends can override
it to materialise the ACL from the key-value store.
Pass `FilesystemOperationContext` through `access()` at all call
sites so the new virtual hook receives the context it needs.
A caller-supplied `RichACL scratch` buffer is provided so
temporary ACLs can be returned without extra allocation.
The in-memory base implementation is not affected by the changes.
Also document all affected interface declarations according
to their implementations.
Signed-off-by: guillex <guillex@leil.io>1 parent 882ea90 commit 6053d00
File tree
10 files changed
+394
-109
lines changed- src/master
10 files changed
+394
-109
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1938 | 1938 | | |
1939 | 1939 | | |
1940 | 1940 | | |
1941 | | - | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1942 | 1944 | | |
1943 | 1945 | | |
1944 | 1946 | | |
| |||
1979 | 1981 | | |
1980 | 1982 | | |
1981 | 1983 | | |
1982 | | - | |
| 1984 | + | |
| 1985 | + | |
1983 | 1986 | | |
1984 | 1987 | | |
1985 | 1988 | | |
| |||
1991 | 1994 | | |
1992 | 1995 | | |
1993 | 1996 | | |
1994 | | - | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1995 | 2000 | | |
1996 | 2001 | | |
1997 | 2002 | | |
| |||
2021 | 2026 | | |
2022 | 2027 | | |
2023 | 2028 | | |
2024 | | - | |
2025 | | - | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
2026 | 2032 | | |
2027 | 2033 | | |
2028 | 2034 | | |
| |||
2076 | 2082 | | |
2077 | 2083 | | |
2078 | 2084 | | |
2079 | | - | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
2080 | 2094 | | |
2081 | 2095 | | |
2082 | 2096 | | |
2083 | 2097 | | |
2084 | | - | |
| 2098 | + | |
| 2099 | + | |
2085 | 2100 | | |
2086 | 2101 | | |
2087 | 2102 | | |
| |||
2238 | 2253 | | |
2239 | 2254 | | |
2240 | 2255 | | |
2241 | | - | |
| 2256 | + | |
2242 | 2257 | | |
2243 | 2258 | | |
2244 | 2259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
182 | 193 | | |
183 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
208 | 223 | | |
209 | 224 | | |
210 | 225 | | |
211 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
212 | 237 | | |
213 | 238 | | |
214 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
472 | 507 | | |
473 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
474 | 520 | | |
475 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
476 | 541 | | |
477 | 542 | | |
478 | 543 | | |
| |||
501 | 566 | | |
502 | 567 | | |
503 | 568 | | |
504 | | - | |
| 569 | + | |
| 570 | + | |
505 | 571 | | |
506 | 572 | | |
507 | 573 | | |
| |||
0 commit comments