fix: #33862 – Security menu missing on MySQL due to case mismatch - #33864
fix: #33862 – Security menu missing on MySQL due to case mismatch#33864caerux wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
I've completed my review and didn't find any issues.
Files scanned
| File Path | Reviewed |
|---|---|
| superset/views/roles.py | ✅ |
| superset/views/users_list.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #33864 +/- ##
===========================================
+ Coverage 60.48% 72.88% +12.39%
===========================================
Files 1931 559 -1372
Lines 76236 40402 -35834
Branches 8568 4245 -4323
===========================================
- Hits 46114 29448 -16666
+ Misses 28017 9857 -18160
+ Partials 2105 1097 -1008
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Not sure, but I'm wondering if this can break things for people that have attached roles to it (?) Quick grep shows more low-cap 'security': Putting an |
|
I think permissions are stored in a database, so if we update the name without a migration, it could break for others. I think @michael-s-molina ran into something like this but could be wrong. |
Yes, these types of changes without proper migrations will break existing deployments. We ran into one of these when upgrading to 4.1. |
|
Do we have reusable constructs / methods to easily generate permission renames as part of db migrations? |
|
Hi @caerux 👋 This PR has been on hold for about 6 months. Per the discussion, this change needs a DB migration to avoid breaking existing deployments that have roles attached to the current permission names. @mistercrunch asked if there are reusable constructs/methods to easily generate permission renames as part of DB migrations - that might be a good starting point. Are you still interested in working on this? If so, adding a migration would unblock the PR. If you need help or guidance on the migration approach, feel free to ask! Thanks for your contribution! |
|
I accidentally picked up the same piece of work over on #40527 Happy to close this in favor of that, or vice versa. Review(s) appreciated if you want to help merge the new one. |
|
Thanks for digging into this @caerux, the diagnosis is right. As I mentioned I picked up the work over in #40527 (still open), so I'll close this in favor of that one, but ping me if you think there's value here I'm missing and we'll reopen this. Reviews on #40527 very welcome if you'd like to help land it. Thank you once again! |
Summary
Align view permission names with their menu label so Superset creates the correct “Security” row on MySQL.
Fix
class_permission_name = "Security"class_permission_name = "Security"Impact
Restores the Security menu on fresh MySQL installs without affecting
PostgreSQL or existing deployments.
Resolves #33862