django-restit 4.2.68__py3-none-any.whl → 4.2.70__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 CHANGED
@@ -249,7 +249,7 @@ class Group(models.Model, RestModel, MetaDataModel):
249
249
  q = q | Q(parent__parent=self)
250
250
  if great_grand_children:
251
251
  q = q | Q(parent__parent__parent=self)
252
- q = q | Q(group__parent__parent__parent=self)
252
+ q = q | Q(parent__parent__parent__parent=self)
253
253
  return Group.objects.filter(q)
254
254
 
255
255
  def getAllChildrenIds(self, include_me=False, grand_children=False, great_grand_children=False, depth=0):
account/rpc/auth.py CHANGED
@@ -11,11 +11,15 @@ from medialib.qrcode import generateQRCode
11
11
  from django.http import HttpResponse
12
12
  from datetime import datetime, timedelta
13
13
 
14
+ ALLOW_BASIC_LOGIN = settings.get("ALLOW_BASIC_LOGIN", False)
15
+
14
16
 
15
17
  @rd.urlPOST(r'^login$')
16
18
  @rd.urlPOST(r'^login/$')
17
19
  @rd.never_cache
18
20
  def member_login(request):
21
+ if not ALLOW_BASIC_LOGIN:
22
+ return jwt_login(request)
19
23
  username = request.DATA.get('username', None)
20
24
  auth_code = request.DATA.get(["auth_code", "code", "invite_token"], None)
21
25
  if username and auth_code:
@@ -198,7 +202,7 @@ def member_login_uname_code(request, username, auth_code):
198
202
  request.member = member
199
203
  member.log("login_blocked", "accessing expired token link", request, method="login", level=31)
200
204
  return rv.restPermissionDenied(request, "token expired", error_code=493)
201
- password = request.DATA.get(['password', 'new_password'], None)
205
+ password = request.DATA.get('new_password', None)
202
206
  if password:
203
207
  member.setPassword(password)
204
208
  member.auth_code = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.68
3
+ Version: 4.2.70
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -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=fgWWYS69Ll5a1jH7syFQKkEGEU54cO-rn6HTbAvPbRY,21984
29
+ account/models/group.py,sha256=iDD_oSgswKV_t_gXZuVK80MvICrZZqdANm2jtGtOFy8,21985
30
30
  account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
31
31
  account/models/member.py,sha256=Pp4Np75L8TzVBC1N3g7Vnt5zy4cMBy7W0OG7mZ5Cfqg,50756
32
32
  account/models/membership.py,sha256=GJ6bSFLfU1CN9466k0XjSwn1sQIEwFeC8-oUYd2MrSs,9217
@@ -40,7 +40,7 @@ account/passkeys/__init__.py,sha256=FwXYJXwSJXfkLojGBcVpF1dFpgFhzDdd9N_3naYQ0cc,
40
40
  account/passkeys/core.py,sha256=xj-vXjSrfWDvc5MYtEmXzwaMkNHl-cXrQKVrN9soRCg,4126
41
41
  account/periodic.py,sha256=-u0n-7QTJgDOkasGhBAPwHAwjpqWGA-MZLEFkVTqCGU,874
42
42
  account/rpc/__init__.py,sha256=SGF0M_-H0dKh3b1apSX29BotNWAvITYccGQVC0MIjL8,336
43
- account/rpc/auth.py,sha256=Vrg8j_bb5jeIahIMlEm86LTKBi-pCKBagpTC4EcN8i0,15770
43
+ account/rpc/auth.py,sha256=oTMXstslgQSXZmTA1Achqvpqyr5eEhHf9n7iumy_D-U,15882
44
44
  account/rpc/device.py,sha256=fbbZFp3cUdhVXvD7gVFOqFWj4hKS3bjZKD_aF5fQxd8,2852
45
45
  account/rpc/group.py,sha256=FD9GymgPY68y-gtDLsZxYVdwQJeLGpqcP4hjcDUh-GM,4022
46
46
  account/rpc/member.py,sha256=PU-Uz5KUI_BZFy-F-taDqAfnt_AwONYXSzUvfm7eyTw,1264
@@ -433,7 +433,7 @@ rest/templates/rest_html.html,sha256=utOzvXEE6LiHFUvcAQUDOQ0yl3J_2F3-22r0K611eTQ
433
433
  rest/ua.py,sha256=0wwOtJPWCiCxUKzWKyMApRbSaiuAxCCk0Pe3OwzYBhE,185398
434
434
  rest/uberdict.py,sha256=ivDpzfchQqX8dM2_TtuyMW7NNO-j7zDmxkdKixQxvU4,17064
435
435
  rest/url_docs.py,sha256=O8O_CQso3fB-7o-huidIT1BRGv5R6lDW-yKHnsGyAPk,11881
436
- rest/urls.py,sha256=QUx1F8eKpNnTibLg4L9KaaU3qQRkXcElcDClSeO_H48,1869
436
+ rest/urls.py,sha256=HkmRhZVpOpzJDt6fZ16SJ54WBq34E15nt3cJ8qg-e8I,1870
437
437
  rest/views.py,sha256=WUjHQMCzw2f4Te2X4Kh40ksfoVAAlrWC2pbt8nhcIYA,1115
438
438
  sessionlog/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
439
439
  sessionlog/README.md,sha256=vQEVJ_8u3Vv19VwPfscjCiHFu61ZSrEM-KIuBpUXhws,62
@@ -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.68.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
505
- django_restit-4.2.68.dist-info/METADATA,sha256=E9U9owcQp_3cq2b5YoLRfJDJji83qeVzc70nOCFUvbo,7645
506
- django_restit-4.2.68.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
507
- django_restit-4.2.68.dist-info/RECORD,,
504
+ django_restit-4.2.70.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
505
+ django_restit-4.2.70.dist-info/METADATA,sha256=ET_WVOOaFH2K9I4UrGI50an2pN7DZ4a1pZ0Y4ZKHv8g,7645
506
+ django_restit-4.2.70.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
507
+ django_restit-4.2.70.dist-info/RECORD,,
rest/urls.py CHANGED
@@ -26,7 +26,7 @@ def load_app(app, root_module=None):
26
26
  try:
27
27
  module = loadModule(f"{app}.rpc")
28
28
  if module is None:
29
- module = loadModule(f"{app}.rurl")
29
+ module = loadModule(f"{app}.rurls")
30
30
  if module is None:
31
31
  module = loadModule(f"{app}.rapi")
32
32
  except ImportError as err: