aiteamutils 0.2.98__py3-none-any.whl → 0.2.101__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
aiteamutils/base_service.py
CHANGED
@@ -44,27 +44,26 @@ class BaseService(Generic[ModelType]):
|
|
44
44
|
unique_check: List[Dict[str, Any]] | None = None,
|
45
45
|
fk_check: List[Dict[str, Any]] | None = None,
|
46
46
|
org_ulid_position: str = "organization_ulid",
|
47
|
-
role_permission: str =
|
47
|
+
role_permission: str | None = None,
|
48
48
|
token_settings: Dict[str, Any] | None = None
|
49
49
|
) -> ModelType:
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
if not permission_result:
|
59
|
-
raise CustomException(
|
60
|
-
ErrorCode.FORBIDDEN,
|
61
|
-
detail=f"{role_permission}",
|
62
|
-
source_function=f"{self.__class__.__name__}.create"
|
51
|
+
if role_permission:
|
52
|
+
permission_result = await verify_role_permission(
|
53
|
+
request=request,
|
54
|
+
role_permission=role_permission,
|
55
|
+
token_settings=token_settings,
|
56
|
+
org_ulid_position=org_ulid_position
|
63
57
|
)
|
64
58
|
|
59
|
+
if not permission_result:
|
60
|
+
raise CustomException(
|
61
|
+
ErrorCode.FORBIDDEN,
|
62
|
+
detail=f"{role_permission}",
|
63
|
+
source_function=f"{self.__class__.__name__}.create"
|
64
|
+
)
|
65
|
+
|
65
66
|
try:
|
66
|
-
body = await request.json()
|
67
|
-
|
68
67
|
async with self.db_session.begin():
|
69
68
|
# 고유 검사 수행
|
70
69
|
if unique_check:
|
@@ -205,25 +204,25 @@ class BaseService(Generic[ModelType]):
|
|
205
204
|
limit: int = 100,
|
206
205
|
filters: List[Dict[str, Any]] | None = None,
|
207
206
|
org_ulid_position: str = "organization_ulid",
|
208
|
-
role_permission: str =
|
207
|
+
role_permission: str | None = None,
|
209
208
|
response_model: Any = None,
|
210
209
|
explicit_joins: Optional[List[Any]] = None,
|
211
210
|
loading_joins: Optional[List[Any]] = None,
|
212
211
|
order: Optional[str] = None,
|
213
212
|
token_settings: Dict[str, Any] | None = None
|
214
213
|
) -> List[Dict[str, Any]]:
|
215
|
-
permission_result = await verify_role_permission(
|
216
|
-
request=request,
|
217
|
-
role_permission=role_permission,
|
218
|
-
token_settings=token_settings,
|
219
|
-
org_ulid_position=org_ulid_position
|
220
|
-
)
|
221
|
-
|
222
|
-
# 매번 새로운 리스트 생성
|
223
214
|
filters = list(filters) if filters is not None else []
|
224
215
|
|
225
|
-
if
|
226
|
-
|
216
|
+
# if role_permission:
|
217
|
+
# permission_result = await verify_role_permission(
|
218
|
+
# request=request,
|
219
|
+
# role_permission=role_permission,
|
220
|
+
# token_settings=token_settings,
|
221
|
+
# org_ulid_position=org_ulid_position
|
222
|
+
# )
|
223
|
+
|
224
|
+
# if permission_result and isinstance(permission_result, dict):
|
225
|
+
# filters.append(permission_result)
|
227
226
|
|
228
227
|
try:
|
229
228
|
if order is None:
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.101"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
aiteamutils/__init__.py,sha256=kRBpRjark0M8ZwFfmKiMFol6CbIILN3WE4f6_P6iIq0,1089
|
2
2
|
aiteamutils/base_model.py,sha256=bnRJJaGXGS3TKxfCWWV3arFjdG0qLsPFDXuguYsDyVM,3008
|
3
3
|
aiteamutils/base_repository.py,sha256=HKcgYyEb0JypojoXBFcIT39hPC5CqnjBkHT__GV-lfQ,4615
|
4
|
-
aiteamutils/base_service.py,sha256=
|
4
|
+
aiteamutils/base_service.py,sha256=qudDby4PunrzOfQBgsZma12mFAgMgxydN8ZK1ukmeiY,10688
|
5
5
|
aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
|
6
6
|
aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
|
7
7
|
aiteamutils/database.py,sha256=b4fN0XHNWxMJeS5M95JcJ7tujAJ1x3SPTAfDvJdB4sE,19696
|
@@ -9,7 +9,7 @@ aiteamutils/enums.py,sha256=7WLqlcJqQWtETAga2WAxNp3dJTQIAd2TW-4WzkoHHa8,2498
|
|
9
9
|
aiteamutils/exceptions.py,sha256=wls-R8qbD7fWzEgDDY1Eiy1vXl59R5IsCXTRkZpBiGU,16021
|
10
10
|
aiteamutils/security.py,sha256=8PDJNsbHl1Q1MsIT37IkJMCO1PhInZG85gMdKRcQr_0,11580
|
11
11
|
aiteamutils/validators.py,sha256=PvI9hbMEAqTawgxPbiWRyx2r9yTUrpNBQs1AD3w4F2U,7726
|
12
|
-
aiteamutils/version.py,sha256=
|
13
|
-
aiteamutils-0.2.
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
12
|
+
aiteamutils/version.py,sha256=bwHopPTxEzqEIx5uPwtHDVuFov4vRO3tqr-w8xwJQDY,43
|
13
|
+
aiteamutils-0.2.101.dist-info/METADATA,sha256=HAywX5tIQ1AHkS95YoAICOaMOkrq9pAVhKhBxa0aLlk,1719
|
14
|
+
aiteamutils-0.2.101.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
aiteamutils-0.2.101.dist-info/RECORD,,
|
File without changes
|