You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/10 15:16:11 UTC

[GitHub] andrewsali opened a new issue #4398: database_access on [mydb] permissionview not created when database added

andrewsali opened a new issue #4398: database_access on [mydb] permissionview not created when database added
URL: https://github.com/apache/incubator-superset/issues/4398
 
 
   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 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

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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