You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/17 17:56:29 UTC

[GitHub] [incubator-superset] dflionis opened a new issue #7541: Preview Incorrectly Reports Lack of Table Access

dflionis opened a new issue #7541: Preview Incorrectly Reports Lack of Table Access
URL: https://github.com/apache/incubator-superset/issues/7541
 
 
   When users without `all database access` or `all_data_source_access` use the table schema dropdown to navigate to a table to which they have access, the Preview tab shows a red error message indicating the user does not have access to the table.
   
   ### Expected results
   
   If the user has the ability to SELECT from a table, Superset should not flash a red error message across the screen when the user attempts to preview the table.
   
   ### Actual results
   
   The following error is shown in the preview tab: `You need access to the following tables: ["some_schema"."some_table"], all database access, or `all_datasource_access` permission'
   
   #### Screenshots
   
   ![example_error](https://user-images.githubusercontent.com/4164884/57946095-86547980-78a9-11e9-9dc1-a03500f44e10.png)
   
   #### How to reproduce the bug
   
   1. Create a user who has schema access on a given schema but does not have `all_datasource_access`or `all database access on all_database_access`. 
   2. In the drop down menus on the left hand side of the SQL Lab editor, navigate to the database, schema, and a table name (for a table within the schema from Step 1)
   3. As the table information loads, the error message mentioned above ("You need access...") should appear in red in the Preview tab for that table.
   4. Run a simple SELECT query from the editor to confirm that the user can indeed access the table.
   
   ### Environment
   
   - superset version: 0.32.0rc2
   - python version: 3.6
   - node.js version: ???
   - npm version: ???
   
   ### Checklist
   
   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 there are 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.
   
   ### Additional context
   
   I'm assuming there may be an issue with the `rejected_datasources()` function in `security.py` since it appears to be incorrectly identifying which data sources are and are not accessible.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org