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_r290138028
##########
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:
Can we make this:
`return self.all_database_access() or self.can_access('database_access',
database.perm)` ?
----------------------------------------------------------------
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]