django-restit 4.2.64__py3-none-any.whl → 4.2.65__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.
- account/models/group.py +6 -0
- {django_restit-4.2.64.dist-info → django_restit-4.2.65.dist-info}/METADATA +1 -1
- {django_restit-4.2.64.dist-info → django_restit-4.2.65.dist-info}/RECORD +7 -7
- rest/__init__.py +1 -1
- rest/serializers/response.py +2 -1
- {django_restit-4.2.64.dist-info → django_restit-4.2.65.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.64.dist-info → django_restit-4.2.65.dist-info}/WHEEL +0 -0
account/models/group.py
CHANGED
@@ -200,6 +200,12 @@ class Group(models.Model, RestModel, MetaDataModel):
|
|
200
200
|
self.auditLog(note, "group_edit", level=21)
|
201
201
|
self.logEvent("group_edit", component="account.Member", component_id=request.member.id, note=note)
|
202
202
|
|
203
|
+
def set_name(self, value):
|
204
|
+
if value is not None:
|
205
|
+
self.name = value.strip()
|
206
|
+
else:
|
207
|
+
self.name = None
|
208
|
+
|
203
209
|
def set_child_of(self, value):
|
204
210
|
# this is a helper to add this group to another group
|
205
211
|
parent = Group.objects.filter(pk=value).last()
|
@@ -26,7 +26,7 @@ account/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
26
26
|
account/models/__init__.py,sha256=cV_lMnT2vL_mjiYtT4hlcIHo52ocFbGSNVkOIHHLXZY,385
|
27
27
|
account/models/device.py,sha256=MVWZEYrX_4zJaqmJS_feFplfVXYyqBJ-0_Fm3B1SVg8,5226
|
28
28
|
account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
|
29
|
-
account/models/group.py,sha256=
|
29
|
+
account/models/group.py,sha256=my4KT71BlS64d-Ozz9n6d57nH429kFpVdJQZZTlMqhs,21723
|
30
30
|
account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
|
31
31
|
account/models/member.py,sha256=CxxhNnFCQPEw7MGc5147J8eandYqUj6HhhQ_YRyFQX4,50397
|
32
32
|
account/models/membership.py,sha256=GJ6bSFLfU1CN9466k0XjSwn1sQIEwFeC8-oUYd2MrSs,9217
|
@@ -368,7 +368,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
368
368
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
369
369
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
370
370
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
371
|
-
rest/__init__.py,sha256=
|
371
|
+
rest/__init__.py,sha256=kLJs7pPu-4NUImnfU-E_eExXqJUChELhQ1dk5RGu0Gs,121
|
372
372
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
373
373
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
374
374
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -417,7 +417,7 @@ rest/serializers/legacy.py,sha256=a5O-x2PqMKX8wYWrhCmdcivVbkPnru7UdyLbrhCaAdY,61
|
|
417
417
|
rest/serializers/localizers.py,sha256=BegaCvTQVaruhWzvGHq3zWeVFmtBChatquRqAtkke10,410
|
418
418
|
rest/serializers/model.py,sha256=08HJeqpmytjxvyiJFfsSRRG0uH-iK2mXCw6w0oMfWrI,8598
|
419
419
|
rest/serializers/profiler.py,sha256=OxOimhEyvCAuzUBC9Q1dz2xaakjAqmSnekMATsjduXM,997
|
420
|
-
rest/serializers/response.py,sha256=
|
420
|
+
rest/serializers/response.py,sha256=hl5ruTWKML352Nob75uc3YGTplYmBu7OMjWeEWVEs9Y,7234
|
421
421
|
rest/serializers/util.py,sha256=-In89fpuVTd6_Ul8nwEUt3DjVKdpeoEyAxudlyB8K6Y,2734
|
422
422
|
rest/settings_helper.py,sha256=_Vn9nmL5_GPss9zIsXzacbTQkn99NbO42CqvOZC3ge4,1532
|
423
423
|
rest/ssl_check.py,sha256=kH4Pk4upUEwKTAnBLR0DIKezNJHjkW3g2TdQAObEgW4,1419
|
@@ -501,7 +501,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
501
501
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
502
502
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
503
503
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
504
|
-
django_restit-4.2.
|
505
|
-
django_restit-4.2.
|
506
|
-
django_restit-4.2.
|
507
|
-
django_restit-4.2.
|
504
|
+
django_restit-4.2.65.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
505
|
+
django_restit-4.2.65.dist-info/METADATA,sha256=XwmVxTmyV_07GGXG6B0dJ9cuFtCO6VUJeFDEPBXFzcQ,7594
|
506
|
+
django_restit-4.2.65.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
507
|
+
django_restit-4.2.65.dist-info/RECORD,,
|
rest/__init__.py
CHANGED
rest/serializers/response.py
CHANGED
@@ -12,6 +12,7 @@ from . import json as js
|
|
12
12
|
from . import csv
|
13
13
|
from . import excel
|
14
14
|
# from . import profiler
|
15
|
+
STATUS_ON_PERM_DENIED = settings.get("STATUS_ON_PERM_DENIED", 403)
|
15
16
|
|
16
17
|
|
17
18
|
def restStatus(request, status, data={}, **kwargs):
|
@@ -94,7 +95,7 @@ def restResponseLog(request, resp):
|
|
94
95
|
PersistentLog.log(resp, 0, request, "rest", action="response")
|
95
96
|
|
96
97
|
|
97
|
-
def restPermissionDenied(request, error="permission denied", error_code=403, status=
|
98
|
+
def restPermissionDenied(request, error="permission denied", error_code=403, status=STATUS_ON_PERM_DENIED,
|
98
99
|
component=None, component_id=None):
|
99
100
|
# from rest import helpers as rh
|
100
101
|
# rh.log_error(error)
|
File without changes
|
File without changes
|