django-restit 4.2.122__py3-none-any.whl → 4.2.123__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.
- {django_restit-4.2.122.dist-info → django_restit-4.2.123.dist-info}/METADATA +1 -1
- {django_restit-4.2.122.dist-info → django_restit-4.2.123.dist-info}/RECORD +6 -6
- rest/__init__.py +1 -1
- rest/models/base.py +8 -1
- {django_restit-4.2.122.dist-info → django_restit-4.2.123.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.122.dist-info → django_restit-4.2.123.dist-info}/WHEEL +0 -0
@@ -374,7 +374,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
374
374
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
375
375
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
376
376
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
377
|
-
rest/__init__.py,sha256=
|
377
|
+
rest/__init__.py,sha256=9U4bbRpojdF2iTaNZzy6i2wcFFL4PyJAXf243H2cR_w,122
|
378
378
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
379
379
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
380
380
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -407,7 +407,7 @@ rest/middleware/request.py,sha256=JchRNy5L-bGd-7h-KFYekGRvREe2eCkZXKOYqIkP2hI,41
|
|
407
407
|
rest/middleware/session.py,sha256=zHSoQpIzRLmpqr_JvW406wzpvU3W3gDbm5JhtzLAMlE,10240
|
408
408
|
rest/middleware/session_store.py,sha256=1nSdeXK8PyuYgGgIufqrS6j6QpIrQ7zbMNT0ol75e6U,1901
|
409
409
|
rest/models/__init__.py,sha256=M8pvFDq-WCF-QcM58X7pMufYYe0aaQ3U0PwGe9TKbbY,130
|
410
|
-
rest/models/base.py,sha256=
|
410
|
+
rest/models/base.py,sha256=fBW62KkwUF7j9Es4B_UzjfgbIRIUAbvN0_-16YjXJ8o,70917
|
411
411
|
rest/models/cacher.py,sha256=eKz8TINVhWEqKhJGMsRkKZTtBUIv5rN3NHbZwOC56Uk,578
|
412
412
|
rest/models/metadata.py,sha256=1nQ7CYo9bJHoaXE_hVNaj1-Y7yqhHlf2ZlaD1IfTzic,12904
|
413
413
|
rest/net.py,sha256=LcB2QV6VNRtsSdmiQvYZgwQUDwOPMn_VBdRiZ6OpI-I,2974
|
@@ -509,7 +509,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
509
509
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
510
510
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
511
511
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
512
|
-
django_restit-4.2.
|
513
|
-
django_restit-4.2.
|
514
|
-
django_restit-4.2.
|
515
|
-
django_restit-4.2.
|
512
|
+
django_restit-4.2.123.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
513
|
+
django_restit-4.2.123.dist-info/METADATA,sha256=HGtIB4-fKEK2kSVmhVJ0a3uo7qH0DTy1r_P1xskGYG4,7663
|
514
|
+
django_restit-4.2.123.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
515
|
+
django_restit-4.2.123.dist-info/RECORD,,
|
rest/__init__.py
CHANGED
rest/models/base.py
CHANGED
@@ -354,8 +354,15 @@ class RestModel(object):
|
|
354
354
|
GenericModel = self.restGetGenericModel(field)
|
355
355
|
if not GenericModel:
|
356
356
|
return None
|
357
|
+
# verify user has permission to access this model
|
357
358
|
key = getattr(self, "{0}_id".format(field))
|
358
|
-
|
359
|
+
obj = GenericModel.rw_objects().filter(pk=key).first()
|
360
|
+
if obj is None:
|
361
|
+
return None
|
362
|
+
if hasattr(obj, "on_rest_can_get"):
|
363
|
+
if not obj.on_rest_can_get(self.getActiveRequest()):
|
364
|
+
return None
|
365
|
+
return None
|
359
366
|
|
360
367
|
@classmethod
|
361
368
|
def get_db_mapping(cls, name):
|
File without changes
|
File without changes
|