rusackas opened a new pull request, #41297: URL: https://github.com/apache/superset/pull/41297
### SUMMARY The RLS `clause` field was validated only for presence and type (`required=True` / `allow_none=False`), which does not reject an empty string and has no non-blank constraint. An empty or whitespace-only clause could be persisted; as a base filter (designed to always restrict) an empty clause produces a predicate that constrains nothing, silently disabling the control. This adds a non-blank validator to the `clause` field on both the create (`RLSPostSchema`) and update (`RLSPutSchema`) schemas, rejecting empty and whitespace-only clauses on both paths. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — schema validation behavior. ### TESTING INSTRUCTIONS Unit tests added in `tests/unit_tests/row_level_security/schema_test.py`: - Blank/whitespace clauses are rejected on create and update. - Non-blank clauses are accepted. - A partial update that omits `clause` remains valid. Run: `pytest tests/unit_tests/row_level_security/schema_test.py` ### 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)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] 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]
