zhang-arvin opened a new pull request, #12503:
URL: https://github.com/apache/gravitino/pull/12503

   ### What changes were proposed in this pull request?
   
   Add FUNCTION and VIEW to the supported metadata object types for policy 
association in PolicyManager, and add PolicyMetadataObjectRelMapper cleanup 
when functions and views are deleted.
   
   ### Why are the changes needed?
   
   Fixes #12501 and #12500.
   
   Currently, FUNCTION and VIEW exist in MetadataObject.Type but are excluded 
from PolicyManager.SUPPORTED_METADATA_OBJECT_TYPES_FOR_POLICIES. As a result, 
policy association requests for functions and views are rejected with "Cannot 
associate policies for unsupported metadata object type FUNCTION/VIEW".
   
   Additionally, when a function or view is deleted, its policy relations are 
not cleaned up, leaving orphaned records.
   
   ### How was this patch tested?
   
   Existing tests cover the policy association, listing, retrieval, and removal 
flows. The changes follow the same pattern as existing supported types 
(FILESET, TOPIC, MODEL).
   
   ### Does this PR introduce any user-facing changes?
   
   Yes - users can now associate policies with FUNCTION and VIEW metadata 
objects via the REST API.


-- 
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