rusackas opened a new pull request, #40145:
URL: https://github.com/apache/superset/pull/40145
### SUMMARY
This is a **test-only PR** opened as a TDD-style validation of issue #33744.
#33744 (filed 2025-06) reports that the admin UI shows two effectively
identical RLS permissions:
- \`can read on Row Level Security\`
- \`can read on RowLevelSecurity\`
Operators have to grant both for a role to actually work. The cause is a
divergence between the spaced canonical name used by the REST API and security
manager allow-list ("Row Level Security") and the no-spaces name auto-derived
from the Python class name in \`superset/views/sqla.py:32\`:
\`\`\`python
class RowLevelSecurityView(BaseSupersetView):
route_base = "/rowlevelsecurity"
class_permission_name = "RowLevelSecurity" # ← diverges
\`\`\`
This PR adds one regression test:
- **\`test_row_level_security_view_uses_canonical_permission_name\`** — pins
\`RowLevelSecurityView.class_permission_name\` to "Row Level Security" and
cross-checks against \`SupersetSecurityManager.ADMIN_ONLY_VIEW_MENUS\`.
### How to interpret CI
- **CI green** → divergence already aligned; merging closes #33744 and
prevents future regressions.
- **CI red** → bug is still live. Fix is one line in
\`superset/views/sqla.py\`: change \`class_permission_name =
"RowLevelSecurity"\` to \`class_permission_name = "Row Level Security"\`. (May
also need a small migration to clean up the orphaned permission in existing
deployments.)
### TESTING INSTRUCTIONS
\`\`\`bash
pytest tests/unit_tests/views/test_sqla.py -v
\`\`\`
### ADDITIONAL INFORMATION
- [ ] Has associated issue: closes #33744
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (likely needed alongside the code fix to remove
the orphaned permission)
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]