Coverage for /home/airflow/.local/lib/python3.12/site-packages/airflow/api_fastapi/auth/managers/models/resource_details.py: 100%
56 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 14:22 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-10-07 14:22 +0000
1#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18from __future__ import annotations
20from dataclasses import dataclass
21from enum import Enum
23from pydantic import NonNegativeInt
26@dataclass
27class ConfigurationDetails:
28 """Represents the details of a configuration."""
30 section: str | None = None
33@dataclass
34class ConnectionDetails:
35 """Represents the details of a connection."""
37 conn_id: str | None = None
38 team_name: str | None = None
41@dataclass
42class DagDetails:
43 """Represents the details of a Dag."""
45 id: str | None = None
46 team_name: str | None = None
49@dataclass
50class BackfillDetails:
51 """
52 Represents the details of a backfill.
54 .. deprecated:: 3.1.8
55 Use DagAccessEntity.Run instead for a dag level access control.
56 """
58 id: NonNegativeInt | None = None
61@dataclass
62class AssetDetails:
63 """Represents the details of an asset."""
65 id: str | None = None
68@dataclass
69class AssetAliasDetails:
70 """Represents the details of an asset alias."""
72 id: str | None = None
75@dataclass
76class PoolDetails:
77 """Represents the details of a pool."""
79 name: str | None = None
80 team_name: str | None = None
83@dataclass
84class TeamDetails:
85 """Represents the details of a team."""
87 name: str | None = None
90@dataclass
91class VariableDetails:
92 """Represents the details of a variable."""
94 key: str | None = None
95 team_name: str | None = None
98class AccessView(Enum):
99 """Enum of specific views the user tries to access."""
101 CLUSTER_ACTIVITY = "CLUSTER_ACTIVITY"
102 DOCS = "DOCS"
103 IMPORT_ERRORS = "IMPORT_ERRORS"
104 JOBS = "JOBS"
105 PLUGINS = "PLUGINS"
106 PROVIDERS = "PROVIDERS"
107 TRIGGERS = "TRIGGERS"
108 WEBSITE = "WEBSITE"
111class DagAccessEntity(Enum):
112 """Enum of Dag entities the user tries to access."""
114 AUDIT_LOG = "AUDIT_LOG"
115 CODE = "CODE"
116 DEPENDENCIES = "DEPENDENCIES"
117 HITL_DETAIL = "HITL_DETAIL"
118 RUN = "RUN"
119 TASK = "TASK"
120 TASK_INSTANCE = "TASK_INSTANCE"
121 TASK_LOGS = "TASK_LOGS"
122 VERSION = "VERSION"
123 WARNING = "WARNING"
124 XCOM = "XCOM"