File tree Expand file tree Collapse file tree 2 files changed +20
-11
lines changed
Expand file tree Collapse file tree 2 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 1- from typing import Any , Callable , Optional , Union
1+ from typing import Any , Callable , Optional
22
33from mavedb .lib .authentication import UserData
44from mavedb .lib .logging .context import save_to_logging_context
55from mavedb .lib .permissions .actions import Action
66from mavedb .lib .permissions .exceptions import PermissionException
77from mavedb .lib .permissions .models import PermissionResponse
8+ from mavedb .lib .types .permissions import EntityType
89from mavedb .models .collection import Collection
910from mavedb .models .experiment import Experiment
1011from mavedb .models .experiment_set import ExperimentSet
2223 user ,
2324)
2425
25- # Define the supported entity types
26- EntityType = Union [
27- Collection ,
28- Experiment ,
29- ExperimentSet ,
30- ScoreCalibration ,
31- ScoreSet ,
32- User ,
33- ]
34-
3526
3627def has_permission (user_data : Optional [UserData ], entity : EntityType , action : Action ) -> PermissionResponse :
3728 """
Original file line number Diff line number Diff line change 1+ from typing import Union
2+
3+ from mavedb .models .collection import Collection
4+ from mavedb .models .experiment import Experiment
5+ from mavedb .models .experiment_set import ExperimentSet
6+ from mavedb .models .score_calibration import ScoreCalibration
7+ from mavedb .models .score_set import ScoreSet
8+ from mavedb .models .user import User
9+
10+ # Define the supported entity types
11+ EntityType = Union [
12+ Collection ,
13+ Experiment ,
14+ ExperimentSet ,
15+ ScoreCalibration ,
16+ ScoreSet ,
17+ User ,
18+ ]
You can’t perform that action at this time.
0 commit comments