class_docstr: Flask-AppBuilder auth manager.
  
  This auth manager is responsible for providing a backward compatible user management experience to users.
docstr: Return the user permissions.
  
  ACTION_CAN_READ and ACTION_CAN_ACCESS_MENU are merged into because they are very similar.
  We can assume that if a user has permissions to read variables, they also have permissions to access
  the menu "Variables".
  
  :param user: the user to get permissions for
  
  :meta private:
docstr_tok: ["Return","the","user","permissions",".","ACTION_CAN_READ","and","ACTION_CAN_ACCESS_MENU","are","merged","into","because","they","are","very","similar",".","We","can","assume","that","if","a","user","has","permissions","to","read","variables",",","they","also","have","permissions","to","access","the","menu","``","Variables","''",".",":","param","user",":","the","user","to","get","permissions","for",":","meta","private",":"]
code: def _get_user_permissions(user: BaseUser):
      """
      Return the user permissions.
  
      ACTION_CAN_READ and ACTION_CAN_ACCESS_MENU are merged into because they are very similar.
      We can assume that if a user has permissions to read variables, they also have permissions to access
      the menu "Variables".
  
      :param user: the user to get permissions for
  
      :meta private:
      """
      perms = getattr(user, "perms") or []
      return [
          (
              ACTION_CAN_READ
              if perm[0] == ACTION_CAN_ACCESS_MENU
              else perm[0],
              perm[1],
          )
          for perm in perms
      ]
  
imports: from __future__ import annotations
  import argparse
  from functools import cached_property
  from pathlib import Path
  from typing import TYPE_CHECKING, Container
  from connexion import FlaskApi
  from flask import Blueprint, url_for
  from sqlalchemy import select
  from sqlalchemy.orm import Session, joinedload
  from airflow.auth.managers.base_auth_manager import BaseAuthManager, ResourceMethod
  from airflow.auth.managers.models.resource_details import AccessView, ConfigurationDetails, ConnectionDetails, DagAccessEntity, DagDetails, DatasetDetails, PoolDetails, VariableDetails
  from airflow.auth.managers.utils.fab import get_fab_action_from_method_map, get_method_from_fab_action_map
  from airflow.cli.cli_config import DefaultHelpParser, GroupCommand
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException
  from airflow.models import DagModel
  from airflow.providers.fab.auth_manager.cli_commands.definition import ROLES_COMMANDS, SYNC_PERM_COMMAND, USERS_COMMANDS
  from airflow.providers.fab.auth_manager.models import Permission, Role, User
  from airflow.security import permissions
  from airflow.security.permissions import ACTION_CAN_ACCESS_MENU, ACTION_CAN_READ, RESOURCE_AUDIT_LOG, RESOURCE_CLUSTER_ACTIVITY, RESOURCE_CONFIG, RESOURCE_CONNECTION, RESOURCE_DAG, RESOURCE_DAG_CODE, RESOURCE_DAG_DEPENDENCIES, RESOURCE_DAG_PREFIX, RESOURCE_DAG_RUN, RESOURCE_DAG_WARNING, RESOURCE_DATASET, RESOURCE_DOCS, RESOURCE_IMPORT_ERROR, RESOURCE_JOB, RESOURCE_PLUGIN, RESOURCE_POOL, RESOURCE_PROVIDER, RESOURCE_SLA_MISS, RESOURCE_TASK_INSTANCE, RESOURCE_TASK_LOG, RESOURCE_TASK_RESCHEDULE, RESOURCE_TRIGGER, RESOURCE_VARIABLE, RESOURCE_WEBSITE, RESOURCE_XCOM
  from airflow.utils.session import NEW_SESSION, provide_session
  from airflow.utils.yaml import safe_load
  from airflow.www.extensions.init_views import _CustomErrorRequestBodyValidator, _LazyResolver
label_desc: Use image node_id 25 for calling the FabAuthManager obj's underlying member method code with example usage: obj._get_user_permissions(user) and returns: unknown