You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/12/12 04:08:34 UTC

[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #8816: Support DB perms

bkyryliuk commented on a change in pull request #8816: Support DB perms
URL: https://github.com/apache/incubator-superset/pull/8816#discussion_r356950680
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -244,14 +244,32 @@ def _deserialize_results_payload(
             return json.loads(payload)  # type: ignore
 
 
+SQLTable = Table(
+    "tables",
+    Model.metadata,  # pylint: disable=no-member
+    Column("id", Integer, primary_key=True),
+    Column("database_id", Integer, ForeignKey("dbs.id")),
+    extend_existing=True,
+)
+
+
 class SliceFilter(BaseFilter):
     def apply(self, query, func):  # noqa
         if security_manager.all_datasource_access():
             return query
-        perms = security_manager.user_view_menu_names("datasource_access")
+        database_perms = security_manager.user_view_menu_names("database_access")
 
 Review comment:
   what do you think about materializing db permissions in the tables and slices?
   this would simplify the checks significantly.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org