utg-base 1.20.1__py3-none-any.whl → 1.20.2__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.
utg_base/permissions/utils.py
CHANGED
|
@@ -21,7 +21,7 @@ def generate_perm_cache_key(user_id: str):
|
|
|
21
21
|
|
|
22
22
|
def has_perm(user_id, perm, request=None):
|
|
23
23
|
if (request is not None and isinstance(request, Request)
|
|
24
|
-
and (request.user.is_superuser or request
|
|
24
|
+
and (request.user.is_superuser or safe_get(request, 'user.accessibility') == AccessibilityType.ADMIN)):
|
|
25
25
|
return True
|
|
26
26
|
redis_conn: Redis = get_redis_connection("shared")
|
|
27
27
|
perm = f"{to_snake_case(env('APP_NAME'))}:{perm}"
|
|
@@ -30,7 +30,7 @@ def has_perm(user_id, perm, request=None):
|
|
|
30
30
|
|
|
31
31
|
def has_perms(user_id: str, perms: list[str], operator: Literal["OR", "AND"] = "OR", request=None):
|
|
32
32
|
if (request is not None and isinstance(request, Request)
|
|
33
|
-
and (request.user.is_superuser or request
|
|
33
|
+
and (request.user.is_superuser or safe_get(request, 'user.accessibility') == AccessibilityType.ADMIN)):
|
|
34
34
|
return True
|
|
35
35
|
redis_conn: Redis = get_redis_connection("shared")
|
|
36
36
|
perms = [f"{to_snake_case(env('APP_NAME'))}:{perm}" for perm in perms]
|
|
@@ -42,7 +42,7 @@ utg_base/models/timestamp.py,sha256=AkCliNXnvs8Z17b1mcS7gOK7v6h3Jul6WCyGyVAkb-w,
|
|
|
42
42
|
utg_base/permissions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
utg_base/permissions/decorators.py,sha256=g-ozzjkjJ-O69_wHWzZnZ9jitFR6MxqGLz2skFjzht4,2118
|
|
44
44
|
utg_base/permissions/folder.py,sha256=uJv40FVb7R379qss66a5oUcLK7KCUIL6DPbzEcGOw38,694
|
|
45
|
-
utg_base/permissions/utils.py,sha256=
|
|
45
|
+
utg_base/permissions/utils.py,sha256=Rp8_ZuU5SdXri4amfFlMmrBoJUjwwQ4GYxDujRpt8YU,3264
|
|
46
46
|
utg_base/references_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
utg_base/references_api/apps.py,sha256=thAGmO-ZT-OD9dHHBSQRL_RRt-Es_jt-mEmHgVTpERs,168
|
|
48
48
|
utg_base/references_api/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -69,6 +69,6 @@ utg_base/utils/sql.py,sha256=rqIWcSjdjIMszdRnsnhV5TTYB8W17RPOujIQA9rKC_Y,762
|
|
|
69
69
|
utg_base/utils/string.py,sha256=ATwIo9uLa00p85h_NjRYLcjRs8o3KSGF7s2yhTg5GiA,1073
|
|
70
70
|
utg_base/utils/thread.py,sha256=4RqRnwtyHymY-dNcuPrMSTamE2V7wCMVfzzyIb0P4TI,2191
|
|
71
71
|
utg_base/utils/translation.py,sha256=GxJHUt0iar_0E7RWBPbeLFQ4DhgXBjffHCmxfKyjFtk,463
|
|
72
|
-
utg_base-1.20.
|
|
73
|
-
utg_base-1.20.
|
|
74
|
-
utg_base-1.20.
|
|
72
|
+
utg_base-1.20.2.dist-info/METADATA,sha256=mP9vQ1VYY-_Wwlfv9rXqA13XWqaRzbn1A38BUjOAgNs,960
|
|
73
|
+
utg_base-1.20.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
74
|
+
utg_base-1.20.2.dist-info/RECORD,,
|
|
File without changes
|