statezero 0.1.0b66__py3-none-any.whl → 0.1.0b67__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.
- statezero/adaptors/django/orm.py +2 -10
- {statezero-0.1.0b66.dist-info → statezero-0.1.0b67.dist-info}/METADATA +1 -1
- {statezero-0.1.0b66.dist-info → statezero-0.1.0b67.dist-info}/RECORD +5 -5
- {statezero-0.1.0b66.dist-info → statezero-0.1.0b67.dist-info}/WHEEL +0 -0
- {statezero-0.1.0b66.dist-info → statezero-0.1.0b67.dist-info}/top_level.txt +0 -0
statezero/adaptors/django/orm.py
CHANGED
|
@@ -314,11 +314,7 @@ class DjangoORMAdapter(AbstractORMProvider):
|
|
|
314
314
|
instance = model.objects.get(q_obj)
|
|
315
315
|
|
|
316
316
|
# Check object-level permissions for update.
|
|
317
|
-
|
|
318
|
-
perm = perm_cls()
|
|
319
|
-
allowed = perm.allowed_object_actions(req, instance, model)
|
|
320
|
-
if ActionType.UPDATE not in allowed:
|
|
321
|
-
raise PermissionDenied(f"Update not permitted on {instance}")
|
|
317
|
+
check_object_permissions(req, instance, ActionType.UPDATE, permissions, model)
|
|
322
318
|
|
|
323
319
|
# Use the provided serializer's save method for the update
|
|
324
320
|
return serializer.save(
|
|
@@ -347,11 +343,7 @@ class DjangoORMAdapter(AbstractORMProvider):
|
|
|
347
343
|
instance = model.objects.get(q_obj)
|
|
348
344
|
|
|
349
345
|
# Check object-level permissions.
|
|
350
|
-
|
|
351
|
-
perm = perm_cls()
|
|
352
|
-
allowed = perm.allowed_object_actions(req, instance, model)
|
|
353
|
-
if ActionType.DELETE not in allowed:
|
|
354
|
-
raise PermissionDenied(f"Delete not permitted on {instance}")
|
|
346
|
+
check_object_permissions(req, instance, ActionType.DELETE, permissions, model)
|
|
355
347
|
|
|
356
348
|
instance.delete()
|
|
357
349
|
return 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: statezero
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0b67
|
|
4
4
|
Summary: Connect your Python backend to a modern JavaScript SPA frontend with 90% less complexity.
|
|
5
5
|
Author-email: Robert <robert.herring@statezero.dev>
|
|
6
6
|
Project-URL: homepage, https://www.statezero.dev
|
|
@@ -12,7 +12,7 @@ statezero/adaptors/django/exception_handler.py,sha256=fjNYT3XuhqnToP38YtYix6kpDu
|
|
|
12
12
|
statezero/adaptors/django/f_handler.py,sha256=r-4qwpWZi2sDgj0REpdGT1owemsr5iMJnDGzAxWJvZI,11994
|
|
13
13
|
statezero/adaptors/django/helpers.py,sha256=7bwsQtr_zoO1UuJpyQ8dLbOHkR25Jh5TA7dekYKQOVo,5822
|
|
14
14
|
statezero/adaptors/django/middleware.py,sha256=2utpDUVQmAk-KBEP9Zt638IO2H6QN0U7sQ-n9LwP1VU,786
|
|
15
|
-
statezero/adaptors/django/orm.py,sha256=
|
|
15
|
+
statezero/adaptors/django/orm.py,sha256=EAIL0uNUQlATxcizwdkV-JO2DoUQXS_R3qCc0kwj9Jk,44023
|
|
16
16
|
statezero/adaptors/django/permissions.py,sha256=bwiTRYn0EWcvdd2htw_Gk-_gf-NUGsdrfhWsEg5BVT8,11163
|
|
17
17
|
statezero/adaptors/django/query_optimizer.py,sha256=k9_trhL1tYtUKVUDXsqQXYn88k3gVmLkqqrtw_QiPxo,40653
|
|
18
18
|
statezero/adaptors/django/schemas.py,sha256=SBYPKre7o6RANCXhzDgyZOvhChIO32W609ATVm0NzxM,16625
|
|
@@ -51,7 +51,7 @@ statezero/core/process_request.py,sha256=s1yys2ms856KJxV-cIfnVIdMkrOW9nLfzyLor64
|
|
|
51
51
|
statezero/core/query_cache.py,sha256=haEBdd4nCm8h8ugj8KmCHUbyiHApU4rv-9PncKJJCys,9528
|
|
52
52
|
statezero/core/telemetry.py,sha256=EV2yLV6WAS-MTYCQSRQadiMgOD_ViJ_qUspgvbD0GqA,7757
|
|
53
53
|
statezero/core/types.py,sha256=An57YP1sdd7u6eppXeKMoSudEn_6-Pb6UoC3IdR5E8w,916
|
|
54
|
-
statezero-0.1.
|
|
55
|
-
statezero-0.1.
|
|
56
|
-
statezero-0.1.
|
|
57
|
-
statezero-0.1.
|
|
54
|
+
statezero-0.1.0b67.dist-info/METADATA,sha256=c7jap5CYdEu20XzFoBw5KnaycffcM-ayMoCoPE4Apd4,9872
|
|
55
|
+
statezero-0.1.0b67.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
56
|
+
statezero-0.1.0b67.dist-info/top_level.txt,sha256=UAuZYPKczradU1kcMQxsGjUzEW0qdgsqzhXyscrcLpw,10
|
|
57
|
+
statezero-0.1.0b67.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|