Skip to content

Commit

Permalink
chore: Remove obsolete creating missing metric permissions (#11143)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley authored Oct 4, 2020
1 parent 3d76f81 commit 5e0603f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions superset/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@ def create_missing_perms(self) -> None:
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")
Expand All @@ -576,11 +575,6 @@ def merge_pv(view_menu: str, perm: str) -> None:
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.
Expand Down

0 comments on commit 5e0603f

Please sign in to comment.