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

   ### SUMMARY
   
   `PR #39638` replaced `created_by_fk`/`changed_by_fk` as LLM-facing filter 
inputs with server-side `created_by_me`/`owned_by_me` boolean flags. Two stale 
artifacts remained in `superset/mcp_service/privacy.py`:
   
   1. **`inject_current_user_for_self_referencing_filters`** — dead code. After 
the boolean-flag migration, user-ID injection is handled entirely in 
`mcp_core._prepend_self_lookup_filters`. This function was never called after 
that change. Removed.
   
   2. **Comment on `SELF_REFERENCING_FILTER_COLUMNS`** — read _"valid as filter 
inputs"_, which is the opposite of current behaviour. Updated to describe the 
actual role: internal DAO column names that are excluded from the 
`filters_applied` response field to avoid leaking implementation details to LLM 
callers.
   
   `get_schema` already surfaces no `created_by_fk`/`changed_by_fk` in 
`filter_columns` — the `USER_DIRECTORY_FIELDS` exclusion in 
`ModelGetSchemaCore` ensures this — so no changes are needed there.
   
   No logic change; comment correction and dead-code removal only.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — no UI changes.
   
   ### TESTING INSTRUCTIONS
   
   1. `pytest tests/unit_tests/mcp_service/` — existing tests cover all 
affected paths (filter-rejection tests, `get_schema` privacy tests, 
`created_by_me` injection tests).
   2. Confirm `grep -r "inject_current_user_for_self_referencing_filters" 
superset/` returns no matches.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [x] 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