statezero 0.1.0b2__py3-none-any.whl → 0.1.0b3__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.

Potentially problematic release.


This version of statezero might be problematic. Click here for more details.

@@ -681,17 +681,17 @@ class DjangoORMAdapter(AbstractORMProvider):
681
681
  """
682
682
  offset = offset or 0
683
683
 
684
- # First, get the paginated queryset
684
+ # FIXED: Perform bulk permission checks BEFORE slicing
685
+ if req is not None and permissions:
686
+ # Use the existing bulk permission check function on the unsliced queryset
687
+ check_bulk_permissions(req, self.queryset, ActionType.READ, permissions, self.model)
688
+
689
+ # THEN apply pagination/slicing
685
690
  if limit is None:
686
691
  qs = self.queryset[offset:]
687
692
  else:
688
693
  qs = self.queryset[offset : offset + limit]
689
694
 
690
- # If permissions are provided, perform bulk permission checks
691
- if req is not None and permissions:
692
- # Use the existing bulk permission check function
693
- check_bulk_permissions(req, qs, ActionType.READ, permissions, self.model)
694
-
695
695
  return qs
696
696
 
697
697
  def _build_conditions(self, conditions: dict) -> Q:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statezero
3
- Version: 0.1.0b2
3
+ Version: 0.1.0b3
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
@@ -9,7 +9,7 @@ statezero/adaptors/django/exception_handler.py,sha256=cQF1Fm5IjH91ydB54TK9sqXiAO
9
9
  statezero/adaptors/django/f_handler.py,sha256=yvITFj9UAnz8-r-aLEcWoz48tBhZ08-VMq9Fsm2uiN8,12305
10
10
  statezero/adaptors/django/helpers.py,sha256=0Dyq5vboDuTUaH-KpS3oVDjastA9yv6xI6XpBuvRM3I,5974
11
11
  statezero/adaptors/django/middleware.py,sha256=YVr8fkqCk51xJQM-ovtrUiB9Kt9H81cLd9xv4cM9YlM,410
12
- statezero/adaptors/django/orm.py,sha256=0Tyyp81zX7Wc-2AXTQgIei7TqDoXWh23lopaaNxbJMs,36279
12
+ statezero/adaptors/django/orm.py,sha256=G_dhMzX5iaaTSxO4bxSZvxMiBw7mLMWY2GUD0mlkMNg,36304
13
13
  statezero/adaptors/django/permissions.py,sha256=fU2c4bKK0zX2uuVB0UazZHTI-5OkiI5-BtPNcPEWmW0,9525
14
14
  statezero/adaptors/django/query_optimizer.py,sha256=-GNqL7Xn8WP8OsLEAAxXpIszSyEwm-l6WjgdkEFzxUM,38541
15
15
  statezero/adaptors/django/schemas.py,sha256=shq8ed9qHCnbCfYVsRxVE7V3R3GhGIKeRRj7dI3r1IU,12728
@@ -38,8 +38,8 @@ statezero/core/exceptions.py,sha256=_krMHWW9qBbMXvvqFdWf85a3Kayn7XbJczfC3x3gmBI,
38
38
  statezero/core/interfaces.py,sha256=HwcFXWJfIAxqYgWbGesn1Th9O8mvqH2r0XP2UyYifEw,15866
39
39
  statezero/core/process_request.py,sha256=NiG36XEjPMemJI03l5eTNaymyfUbwVgrx78chVcs4Nk,8047
40
40
  statezero/core/types.py,sha256=K9x9AU5J6yd2AWvqRz27CeAY6UYfuQoQ7xTEwTijrmM,1982
41
- statezero-0.1.0b2.dist-info/licenses/license.md,sha256=0uKjybTt9K_YbEmYgf25JN292qjjJ-BPofvIZ3wdtX4,7411
42
- statezero-0.1.0b2.dist-info/METADATA,sha256=XBm8wTTU3iTtKqJDZXWZ9rt2jPp9yW0NqIdkGZuZnPI,7152
43
- statezero-0.1.0b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
- statezero-0.1.0b2.dist-info/top_level.txt,sha256=UAuZYPKczradU1kcMQxsGjUzEW0qdgsqzhXyscrcLpw,10
45
- statezero-0.1.0b2.dist-info/RECORD,,
41
+ statezero-0.1.0b3.dist-info/licenses/license.md,sha256=0uKjybTt9K_YbEmYgf25JN292qjjJ-BPofvIZ3wdtX4,7411
42
+ statezero-0.1.0b3.dist-info/METADATA,sha256=Zccgg4EbNtLlc0X_X0GHmvG7hLMQ4C_lXhPwApMK-aw,7152
43
+ statezero-0.1.0b3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ statezero-0.1.0b3.dist-info/top_level.txt,sha256=UAuZYPKczradU1kcMQxsGjUzEW0qdgsqzhXyscrcLpw,10
45
+ statezero-0.1.0b3.dist-info/RECORD,,