LuciferYang opened a new pull request, #13223:
URL: https://github.com/apache/gravitino/pull/13223

   ### What changes were proposed in this pull request?
   
   The default `loadTable(ident, requiredPrivilegeNames)` now throws 
`UnsupportedOperationException` instead of delegating to `loadTable(ident)`, 
matching the convention used for other unsupported capability defaults.
   
   ### Why are the changes needed?
   
   The default silently discarded the required privileges while the javadoc 
promised privilege-aware loading, so a caller relying on it as an 
access-control checkpoint got the table with no enforcement and no signal.
   
   Fix: #13222
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The default `loadTable(ident, requiredPrivilegeNames)` now throws 
`UnsupportedOperationException` instead of silently ignoring the privileges. 
This is a behavior change for any out-of-tree catalog that relied on the 
default; the only in-repo override, `RelationalCatalog`, forwards the 
privileges to the server and is unaffected.
   
   ### How was this patch tested?
   
   Added `TestTableCatalog`, which pins that the default `loadTable(ident, 
requiredPrivilegeNames)` throws `UnsupportedOperationException`; it fails on 
the pre-fix tree (the default returned the table and dropped the privileges) 
and passes after the fix.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to