apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.54k stars 13.77k forks source link

Edit dataset button is disabled after superset upgrade to 2.0 #22385

Closed prasadpatunkar closed 1 year ago

prasadpatunkar commented 1 year ago

I upgraded superset from 1.4.0 to firstly 1.5.0 and then 2.0.0

When I upgraded to 2.0.0, as a Admin, option to Edit Dataset is disabled (greyed out) when I am on Edit Chart Page. But when I go to Datasets and try to Edit, I am able to Edit the datasets.

Is there a feature flag or permission to fix this issue ?

rusackas commented 1 year ago

Can you test out the new 2.0.1rc5 (currently up for a vote) and let us know if this issue persists? If so, I'm sure @eschutho and/or @AAfghahi might be interested in recruiting some help to fix it for this to get into a 2.0.2 release.

prasadpatunkar commented 1 year ago

Thanks for your response @rusackas

Screenshot 2022-12-13 at 1 05 22 PM Screenshot 2022-12-13 at 1 05 38 PM

upgrading to 2.0.1rc5 did not help :(

Note: When I upgraded from 1.4.0 to 1.5.0, there was no issue. As a Admin, I was able to edit dataset from both the places.

Issue starting showing up with 2.0.0 + versions.

Can we get some help here please.

rusackas commented 1 year ago

CC @lyndsiWilliams

prasadpatunkar commented 1 year ago

Hi @rusackas , we looked at the code from Git repository and found that - line 242 needs improvement- https://github.com/apache/superset/blob/2.0/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx

The Admin user is not included in the Editallow permission. OR clause is missing.

Can somebody please make the update and share the tag ?

Thanks.

rusackas commented 1 year ago

@prasadpatunkar Would you be willing to open up a PR? You might beat us to this one :D

prasadpatunkar commented 1 year ago

@rusackas , can you please mention which branch I raise PR ? Usually PR is created against master branch and master branch already has thing change incorporated.

rusackas commented 1 year ago

I might be a little confused here...

If the fix you are seeking is already incorporated into master, then the work is done and we should close this issue (a link here would be appreciated)

If you're looking to author a code change, you can fork the repository, create your own branch, and open a pull request against master. When the PR is open, link it here, and we'll see it through.

Thanks either way!

mayurnewase commented 1 year ago

this regression was added by https://github.com/apache/superset/pull/20296 in 2.0 (this is a weird patch, there was a discussion on this and was added without tests.)

was fixed on master by https://github.com/apache/superset/pull/20613 (with proper tests)

I think #20613 should be cherry-picked in next releases, then we can close this. @rusackas