sha174n opened a new pull request, #41457:
URL: https://github.com/apache/superset/pull/41457

   ### SUMMARY
   
   Tag relationships can be created through three command paths: the 
single-object `CreateCustomTagCommand`, the bulk 
`CreateCustomTagWithRelationshipsCommand`, and `UpdateTagCommand`. The 
single-object path already checks that the caller may modify the target object 
before creating the relationship (added in #40333).
   
   This PR factors that check into a shared `current_user_can_modify_object` 
helper in `commands/tag/utils.py` and applies it across all three paths so they 
enforce one consistent ownership boundary. Objects are looked up with 
`skip_base_filter=True` so the explicit ownership check decides which objects 
are tagged.
   
   ### TESTING INSTRUCTIONS
   
   `pytest tests/integration_tests/tags/api_tests.py`
   
   Adds `test_bulk_create_and_update_skip_inaccessible_objects`: an object 
owned by another user is skipped by a non-owner's `bulk_create` and `update` 
calls.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to