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

johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e0603f  chore: Remove obsolete creating missing metric permissions 
(#11143)
5e0603f is described below

commit 5e0603f957da9d45d291aab28853c60941e96a1a
Author: John Bodley <[email protected]>
AuthorDate: Sun Oct 4 09:16:29 2020 -0700

    chore: Remove obsolete creating missing metric permissions (#11143)
---
 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.

Reply via email to