Skip to content

Error while uploading Excel without all_database_access #15866

@aleksandrgordienko

Description

@aleksandrgordienko

There is a bug in the code. Superset crashes when you are trying to open the Upload Excel form from a user account without all_database_access permissions.

Expected results

Upload Excel form opened and can be used for file upload.

Actual results

Superset crashes because of the absence of schemas_accessible_by_user() method in SupersetSecurityManager class. The error is in the superset/views/database/forms.py. Correct method name must be **get_**schemas_accessible_by_user()

Screenshots

Haven't made any, sorry:)

How to reproduce the bug

  1. Create database connection with upload support
  2. Create user with Gamma role + permission for Excel uploading + permission for database
  3. Try to open the Upload Excel form from the menu
  4. See the error

Environment

  • superset version: 1.1.0 (but I see the same problem in 1.2.0 and master too)
  • python version: 3.7.9
  • node.js version: not relevant

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces, but didn't include any, sorry again :)
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

I can solve the problem by myself and make a pull request later. I've created this issue as it's written in CONTRIBUTING.md:

Before creating a PR, create an issue.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions