Move permissions view to FAB Auth manager
"""Gets the DAG IDs readable by authenticated user."""
        return self.get_accessible_dag_ids(user, [permissions.ACTION_CAN_READ])
    def get_editable_dag_ids(self, user) -> set[str]:
        """Gets the DAG IDs editable by authenticated user."""
        return self.get_accessible_dag_ids(user, [permissions.ACTION_CAN_EDIT])
    @provide_session
    def get_accessible_dag_ids(
        self,
        user,
        user_actions: Container[str] | None = None,
        session: Session = NEW_SESSION,
    ) -> set[str]:
        """Generic function to get readable or writable DAGs for user."""
        if not user_actions:
            user_actions = [permissions.ACTION_CAN_EDIT, permissions.ACTION_CAN_READ]
        if not get_auth_manager().is_logged_in():
            roles = user.roles
        else:
            if (permissions.ACTION_CAN_EDIT in user_actions and self.can_edit_all_dags(user)) or (
                permissions.ACTION_CAN_READ in user_actions and self.can_read_all_dags(user)
            ):
                return {dag.dag_id for dag in session.query(DagModel.dag_id)}
            user_query = (
                session.query(User)
                .options(
                    joinedload(User.roles)
                    .subqueryload(Role.permissions)