You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2020/10/02 21:02:29 UTC

[incubator-superset] branch john-bodley--security-cleanup-obsolete-permission-logic created (now defd497)

This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a change to branch john-bodley--security-cleanup-obsolete-permission-logic
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


      at defd497  chore: Remove obsolete creating missing metric permissions

This branch includes the following new commits:

     new defd497  chore: Remove obsolete creating missing metric permissions

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-superset] 01/01: chore: Remove obsolete creating missing metric permissions

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch john-bodley--security-cleanup-obsolete-permission-logic
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit defd497486b8354ab586e089706f34b4058547b5
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Fri Oct 2 14:02:03 2020 -0700

    chore: Remove obsolete creating missing metric permissions
---
 superset/security/manager.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/superset/security/manager.py b/superset/security/manager.py
index df2b3e0..17db91e 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -551,7 +551,6 @@ class SupersetSecurityManager(  # pylint: disable=too-many-public-methods
         Creates missing FAB permissions for datasources, schemas and metrics.
         """
 
-        from superset.connectors.base.models import BaseMetric
         from superset.models import core as models
 
         logger.info("Fetching a set of all perms to lookup which ones are missing")
@@ -576,11 +575,6 @@ class SupersetSecurityManager(  # pylint: disable=too-many-public-methods
         for database in databases:
             merge_pv("database_access", database.perm)
 
-        logger.info("Creating missing metrics permissions")
-        metrics: List[BaseMetric] = []
-        for datasource_class in ConnectorRegistry.sources.values():
-            metrics += list(self.get_session.query(datasource_class.metric_class).all())
-
     def clean_perms(self) -> None:
         """
         Clean up the FAB faulty permissions.