question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

database_access on [mydb] permissionview not created when database added

See original GitHub issue

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

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • 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

Superset version

0.22.1

Expected results

When a new database is added, immediately afterwards the permissionview database_access on [mydb] should be created.

Actual results

Permissionview is not created (only schema permissionviews and datasource permissionviews are created). If an update is run on the db, then the database_access permissionview is created.

Steps to reproduce

Add a new database and without any further actions try creating a role that has database_access on this database. This is not possible as permissionview does not exist. If an update is run on the database (without changing anything) then permissionview is correctly created.

Looking at the code it appears that in this line it should use db.get_perm() instead db.perm as db.perm is not set before the database is inserted (it is only set after insert).

https://github.com/apache/incubator-superset/blob/2e172d77cf87ef9b4850f5fa183a2b1815bb6e58/superset/views/core.py#L263

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

0reactions
stale[bot]commented, Apr 10, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CREATE DATABASE permission denied in database 'master
As the error suggests, the SQL login has no permission to create database. Permissions are granted when the login have the required roles....
Read more >
Azure SQL Database & SQL Managed Instance & Azure ...
Learn about how Azure SQL Database, SQL Managed Instance, and Azure Synapse authenticate users for access using logins and user accounts.
Read more >
MySQL 8.0 Reference Manual :: 13.7.1.6 GRANT Statement
MySQL enables you to grant privileges on databases or tables that do not exist. For tables, the privileges to be granted must include...
Read more >
GRANT <privileges> - Snowflake Documentation
Grants one or more access privileges on a securable object to a role or database role. The privileges that can be granted are...
Read more >
How to Grant All Privileges on a Database in MySQL - Chartio
Get the steps from connect to your MySQL database command line tool and ... but if that is not the case, you should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found