aiteamutils 0.2.88__py3-none-any.whl → 0.2.89__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
@@ -43,7 +43,10 @@ class BaseService(Generic[ModelType]):
|
|
43
43
|
exclude_entities: List[str] | None = None,
|
44
44
|
unique_check: List[Dict[str, Any]] | None = None,
|
45
45
|
fk_check: List[Dict[str, Any]] | None = None,
|
46
|
+
org_ulid_position: str = "organization_ulid",
|
47
|
+
role_permission: str = "create"
|
46
48
|
) -> ModelType:
|
49
|
+
await verify_role_permission(request, role_permission)
|
47
50
|
|
48
51
|
try:
|
49
52
|
async with self.db_session.begin():
|
@@ -84,7 +87,9 @@ class BaseService(Generic[ModelType]):
|
|
84
87
|
conditions: Dict[str, Any] | None = None,
|
85
88
|
unique_check: List[Dict[str, Any]] | None = None,
|
86
89
|
exclude_entities: List[str] | None = None,
|
87
|
-
response_model: Any = None
|
90
|
+
response_model: Any = None,
|
91
|
+
org_ulid_position: str = "organization_ulid",
|
92
|
+
role_permission: str = "update"
|
88
93
|
) -> ModelType:
|
89
94
|
try:
|
90
95
|
async with self.db_session.begin():
|
@@ -134,7 +139,9 @@ class BaseService(Generic[ModelType]):
|
|
134
139
|
self,
|
135
140
|
request: Request,
|
136
141
|
ulid: str | None = None,
|
137
|
-
conditions: Dict[str, Any] | None = None
|
142
|
+
conditions: Dict[str, Any] | None = None,
|
143
|
+
org_ulid_position: str = "organization_ulid",
|
144
|
+
role_permission: str = "delete"
|
138
145
|
) -> bool:
|
139
146
|
try:
|
140
147
|
if not ULID.from_str(ulid):
|
@@ -179,10 +186,12 @@ class BaseService(Generic[ModelType]):
|
|
179
186
|
skip: int = 0,
|
180
187
|
limit: int = 100,
|
181
188
|
filters: List[Dict[str, Any]] | None = None,
|
189
|
+
org_ulid_position: str = "organization_ulid",
|
182
190
|
response_model: Any = None,
|
183
191
|
explicit_joins: Optional[List[Any]] = None,
|
184
192
|
loading_joins: Optional[List[Any]] = None,
|
185
|
-
order: Optional[str] = None
|
193
|
+
order: Optional[str] = None,
|
194
|
+
role_permission: str = "list"
|
186
195
|
) -> List[Dict[str, Any]]:
|
187
196
|
try:
|
188
197
|
if order is None:
|
@@ -218,7 +227,9 @@ class BaseService(Generic[ModelType]):
|
|
218
227
|
response_model: Any = None,
|
219
228
|
conditions: Dict[str, Any] | None = None,
|
220
229
|
explicit_joins: Optional[List[Any]] = None,
|
221
|
-
loading_joins: Optional[List[Any]] = None
|
230
|
+
loading_joins: Optional[List[Any]] = None,
|
231
|
+
org_ulid_position: str = "organization_ulid",
|
232
|
+
role_permission: str = "get"
|
222
233
|
):
|
223
234
|
try:
|
224
235
|
if not ulid and not conditions:
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.89"
|
@@ -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=TlGIY4mkSmGq7Pqjz5ybGDCwpXicrSrs2LIFfjNKJqo,9404
|
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=Z9wzR3H4XLpA4U3urR5e4eDnEY3Qhne34nLXsKXiL64,2177
|
|
9
9
|
aiteamutils/exceptions.py,sha256=wls-R8qbD7fWzEgDDY1Eiy1vXl59R5IsCXTRkZpBiGU,16021
|
10
10
|
aiteamutils/security.py,sha256=scyPjVAKXTlu7peGKtUgX-PhcteNWgDt-pDF46PLPy8,10850
|
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=qp3nB-yWKyYCX8Ttv3g_SDaDwxV5ldrepC0S131QqUg,42
|
13
|
+
aiteamutils-0.2.89.dist-info/METADATA,sha256=VLvXEYylcdpRHXATtaAFH0DyW5IKLcBHvnwxageKAcU,1718
|
14
|
+
aiteamutils-0.2.89.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
aiteamutils-0.2.89.dist-info/RECORD,,
|
File without changes
|