mistercrunch commented on a change in pull request #7618: Add Filter on
DatabaseView that filters DBs Based on Role Access
URL:
https://github.com/apache/incubator-superset/pull/7618#discussion_r290139858
##########
File path: superset/security.py
##########
@@ -127,12 +127,11 @@ def all_datasource_access(self):
return self.can_access(
'all_datasource_access', 'all_datasource_access')
+ def all_database_access(self):
+ return self.can_access('all_database_access', 'all_database_access')
+
def database_access(self, database):
- return (
- self.can_access(
- 'all_database_access', 'all_database_access') or
- self.can_access('database_access', database.perm)
- )
+ return self.can_access('database_access', database.perm)
Review comment:
BTW I feel like I wrote/merged this same PR a few months back but got
reverted because of a perm issue (Alpha couldn't see the database list in SQL
Lab).
PR that got reverted:
https://github.com/apache/incubator-superset/pull/7009
Related fix:
https://github.com/apache/incubator-superset/pull/7271
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]