superset icon indicating copy to clipboard operation
superset copied to clipboard

Newly created datasource should be accessible be creator

Open maver1ck opened this issue 8 years ago • 7 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [X] I have checked the superset logs for python stacktraces and included it here as text if any
  • [X] I have reproduced the issue with at least the latest released version of superset
  • [X] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.22.1

Expected results

When user without all datasource access is creating datasource (using visualize button in SQL Lab) the datasource should be accessible to this user.

Actual results

This endpoint requires the datasource test-hadoop-Untitled Query 2-HJG51B-DUf, database or `all_datasource_access` permission
You do not have permissions to access the datasource(s): test-hadoop-Untitled Query 2-HJG51B-DUf.

Steps to reproduce

  1. Create user with Gamma and sql_lab roles
  2. Run query in SQL Lab
  3. Click Visualize button then Visualize
  4. Watch No Access! page

maver1ck avatar Feb 06 '18 11:02 maver1ck

I don't really know how to fix this bug. I see two options.

  1. Datasources are always accessible by owner (using check_ownership) But this makes a lot of changes in code
  2. We're creating one special role per user for situations like that.

What do you think ?

maver1ck avatar Feb 06 '18 14:02 maver1ck

see https://github.com/apache/incubator-superset/issues/2798

timifasubaa avatar Feb 15 '18 00:02 timifasubaa

Thanks for pointing that. I think we have really mess with permissions and I don't know how this should work.

maver1ck avatar Feb 15 '18 08:02 maver1ck

I tried replicating this error as I'm currently doing some permissions cleanup but I was unable to run queries as a gamma user despite having sql_lab permissions.

how were you able to run the query?

timifasubaa avatar Mar 05 '18 19:03 timifasubaa

How to solve it? Help, please.

qin4zhang avatar May 31 '18 10:05 qin4zhang

@timifasubaa you need to have Gamma + SQL Lab + some sort of database, schema, or table permission

mistercrunch avatar May 31 '18 19:05 mistercrunch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Apr 10 '19 21:04 stale[bot]