airflow/www/security.py
"""Returns all permissions as a set of tuples with the perm name and view menu name"""
        return set(
            self.get_session.query(self.permissionview_model)
            .join(self.permission_model)
            .join(self.viewmenu_model)
            .with_entities(self.permission_model.name, self.viewmenu_model.name)
            .all()
        )
    def _get_all_non_dag_permissionviews(self) -> Dict[Tuple[str, str], PermissionView]:
        """
        Returns a dict with a key of (perm name, view menu name) and value of perm view
        with all perm views except those that are for specific DAGs.
        """
        return {
            (perm_name, viewmodel_name): viewmodel
            for perm_name, viewmodel_name, viewmodel in (
                self.get_session.query(self.permissionview_model)
                .join(self.permission_model)
                .join(self.viewmenu_model)
                .filter(~self.viewmenu_model.name.like(f"{permissions.RESOURCE_DAG_PREFIX}%"))
                .with_entities(
                    self.permission_model.name, self.viewmenu_model.name, self.permissionview_model
                )
                .all()
            )
        }
    def _get_all_roles_with_permissions(self) -> Dict[str, Role]: