mistercrunch commented on a change in pull request #8219: Support schema
permissions
URL:
https://github.com/apache/incubator-superset/pull/8219#discussion_r350493846
##########
File path: superset/security.py
##########
@@ -412,23 +451,29 @@ def schemas_accessible_by_user(
):
return schemas
- subset = set()
- for schema in schemas:
- schema_perm = self.get_schema_perm(database, schema)
- if schema_perm and self.can_access("schema_access", schema_perm):
- subset.add(schema)
+ # schema_access
+ accessible_schemas = set(
+ [
Review comment:
NIT: here in py3 can do a set comprehension. `{foo for foo in bar}`
----------------------------------------------------------------
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]