Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Missing SQL Lab permission #27361

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

#27117 removed the following deprecated endpoint:

@deprecated(new_target="/sqllab")
def sqllab(self) -> FlaskResponse:

Which was registered in Superset's initialization:

appbuilder.add_view_no_menu(SqlLab)

superset init uses the registered views to dynamically generate the permissions, in that case, can_sqllab was generated from that entry and it does not exist anymore in a fresh installation of Superset. Searching for can_sqllab we can still find many references to it in the codebase, including the menu item that is missing. This PR adds that permission back using custom permissions.

I also did a diff between 3.1 and 4.0 and found that the following permissions were removed:

can_import_dashboards
can_my_queries
can_profile
can_sqllab

The only permission that is still referenced in the codebase is can_sqllab.

Fixes #27310

TESTING INSTRUCTIONS

Check that the SQL query option appears in the global + menu.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@michael-s-molina michael-s-molina requested a review from a team March 1, 2024 16:17
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.72%. Comparing base (ad6327d) to head (e7f971b).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #27361   +/-   ##
=======================================
  Coverage   69.72%   69.72%           
=======================================
  Files        1908     1908           
  Lines       74550    74551    +1     
  Branches     8317     8317           
=======================================
+ Hits        51982    51983    +1     
  Misses      20515    20515           
  Partials     2053     2053           
Flag Coverage Δ
hive 53.79% <100.00%> (+<0.01%) ⬆️
mysql 78.00% <100.00%> (+<0.01%) ⬆️
postgres 78.10% <100.00%> (+<0.01%) ⬆️
presto 53.74% <100.00%> (+<0.01%) ⬆️
python 83.12% <100.00%> (+<0.01%) ⬆️
sqlite 77.62% <100.00%> (+<0.01%) ⬆️
unit 56.50% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michael-s-molina michael-s-molina merged commit 8a46694 into apache:master Mar 1, 2024
34 checks passed
@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label Mar 4, 2024
michael-s-molina added a commit that referenced this pull request Mar 4, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 2024
@mistercrunch mistercrunch added 🍒 4.0.0 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Apr 17, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 4.0.0 🍒 4.0.1 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL query option no longer shows up in the + menu
3 participants