django-restit 4.2.4__py3-none-any.whl → 4.2.6__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/member.py +3 -1
- account/rpc/auth.py +3 -3
- {django_restit-4.2.4.dist-info → django_restit-4.2.6.dist-info}/METADATA +1 -1
- {django_restit-4.2.4.dist-info → django_restit-4.2.6.dist-info}/RECORD +8 -8
- incident/models/rules.py +2 -1
- rest/__init__.py +1 -1
- {django_restit-4.2.4.dist-info → django_restit-4.2.6.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.4.dist-info → django_restit-4.2.6.dist-info}/WHEEL +0 -0
account/models/member.py
CHANGED
@@ -296,7 +296,9 @@ class Member(User, RestModel, MetaDataModel):
|
|
296
296
|
if not self.is_active:
|
297
297
|
self.log("login_blocked", F"account is not active {self.username}", request, method="login", level=31)
|
298
298
|
if throw_exception:
|
299
|
-
|
299
|
+
if request is not None:
|
300
|
+
request.member = self
|
301
|
+
raise PermissionDeniedException(f"{self.username} Account disabled", 410)
|
300
302
|
return False
|
301
303
|
if self.is_blocked:
|
302
304
|
self.log("login_blocked", F"account is locked out {self.username}", request, method="login", level=31)
|
account/rpc/auth.py
CHANGED
@@ -111,7 +111,7 @@ def jwt_refresh(request):
|
|
111
111
|
return rv.restPermissionDenied(request, error="invalid token", error_code=-702)
|
112
112
|
if member.security_token is None:
|
113
113
|
member.refreshSecurityToken()
|
114
|
-
member.canLogin()
|
114
|
+
member.canLogin(request)
|
115
115
|
token.refresh()
|
116
116
|
request.jwt_token = token.access_token # this tells the middleware to store in cookie
|
117
117
|
return rv.restGet(request, dict(access=token.access_token, refresh=token.refresh_token))
|
@@ -260,11 +260,11 @@ def get_member_from_request(request):
|
|
260
260
|
if not member.is_active:
|
261
261
|
request.member = member
|
262
262
|
member.log("login_blocked", "account is not active", request, method="login", level=31)
|
263
|
-
return member, rv.restPermissionDenied(request, error="Account disabled", error_code=410)
|
263
|
+
return member, rv.restPermissionDenied(request, error=f"{member.username} Account disabled", error_code=410)
|
264
264
|
if member.is_blocked:
|
265
265
|
request.member = member
|
266
266
|
member.log("login_blocked", "account is locked out", request, method="login", level=31)
|
267
|
-
return member, rv.restPermissionDenied(request, error="Account locked out", error_code=411)
|
267
|
+
return member, rv.restPermissionDenied(request, error=f"{member.username} Account locked out", error_code=411)
|
268
268
|
return member, None
|
269
269
|
|
270
270
|
|
@@ -23,7 +23,7 @@ account/models/device.py,sha256=XipNpByreGubB5-d4ZBOoIV5Xw14b2Btcgn6fXz8HAc,4105
|
|
23
23
|
account/models/feeds.py,sha256=4n4Mv8HjcXpUmMPWafHlsGbVQ1fDKdtblL1hp30sDrg,1437
|
24
24
|
account/models/group.py,sha256=jj4csGHDyDRMS_maL8AeV1k3whSxBdeffHxmnXrn-sg,20064
|
25
25
|
account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
|
26
|
-
account/models/member.py,sha256=
|
26
|
+
account/models/member.py,sha256=5y8Reo5Cc0opKrDsd4XJz22fhZoy3_EmE93qPl4649Y,49037
|
27
27
|
account/models/membership.py,sha256=Qmp0xQa_3ObB581L83gce69t9eSfyH-mZZuGqW3ueI8,7763
|
28
28
|
account/models/notify.py,sha256=YnZujSHJHY7B09e6FIyZIEJRWLPYk1Sk1e92tFzB1IA,12078
|
29
29
|
account/models/session.py,sha256=swhxcx_lWzOpGCmfifXoACgWYqmKmS7eZsD9s9jSToc,3509
|
@@ -32,7 +32,7 @@ account/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
account/oauth/google.py,sha256=q5M6Qhpfp9QslKRVYFZBvtG6kgXV6vYMrR5fp6Xdb9I,2078
|
33
33
|
account/periodic.py,sha256=-u0n-7QTJgDOkasGhBAPwHAwjpqWGA-MZLEFkVTqCGU,874
|
34
34
|
account/rpc/__init__.py,sha256=L_AqHC0WbgUgLoqvNz6pY0E34eqh7sRaX77I6TxhRZ4,152
|
35
|
-
account/rpc/auth.py,sha256=
|
35
|
+
account/rpc/auth.py,sha256=twt0gMHVZgKX3aV5oN5K_1jXpRoOH9_ckDeA9nd0Tsk,14896
|
36
36
|
account/rpc/device.py,sha256=fbbZFp3cUdhVXvD7gVFOqFWj4hKS3bjZKD_aF5fQxd8,2852
|
37
37
|
account/rpc/group.py,sha256=Y_Ii-vlDx09neMd95AmC7xBwDf3wdFgXjB-kIG2jMdE,3472
|
38
38
|
account/rpc/member.py,sha256=oKdXSGhQ7AOPTwisZ5RvHhQ1SdZoXWlBQY0lIlDXJY0,1150
|
@@ -98,7 +98,7 @@ incident/models/__init__.py,sha256=NMphuhb0RTMf7Ov4QkNv7iv6_I8Wtr3xQ54yjX_a31M,2
|
|
98
98
|
incident/models/event.py,sha256=Nzy21glVc7V8Z6YziTt3SeQB3xCEKWuVaF01ufjB6xk,6849
|
99
99
|
incident/models/incident.py,sha256=Zsg0FP6wtl2gU8Z1MoCg2uFQ57YfPYpAkIlirYHRMIA,14384
|
100
100
|
incident/models/ossec.py,sha256=p1ptr-8lnaj1EP_VmPR58b2LmaYBGaYYKAMqhWK5yZM,2227
|
101
|
-
incident/models/rules.py,sha256=
|
101
|
+
incident/models/rules.py,sha256=f1TYWxT8WxZtLkngi3jBXbV0-u0CdmgB2mePDunE3-Y,5797
|
102
102
|
incident/models/ticket.py,sha256=S3kqGQpYLE6Y4M9IKu_60sgW-f592xNr8uufqHnvDoU,2302
|
103
103
|
incident/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
104
|
incident/parsers/ossec.py,sha256=joduBYN3J5IINPJaI5G6hn03Mhz9Ymd6xfw8cSiwKAc,5969
|
@@ -352,7 +352,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
352
352
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
353
353
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
354
354
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
355
|
-
rest/__init__.py,sha256=
|
355
|
+
rest/__init__.py,sha256=_aTspOWQgQGORnkd-w0Qm6O_8KEmxZnKx5BO5x-mhkc,120
|
356
356
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
357
357
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
358
358
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -484,7 +484,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
484
484
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
485
485
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
486
486
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
487
|
-
django_restit-4.2.
|
488
|
-
django_restit-4.2.
|
489
|
-
django_restit-4.2.
|
490
|
-
django_restit-4.2.
|
487
|
+
django_restit-4.2.6.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
488
|
+
django_restit-4.2.6.dist-info/METADATA,sha256=-tZKn_1-IB0BehL-M7bNaQTy_YnoBt_l83j4hpyRYiM,7572
|
489
|
+
django_restit-4.2.6.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
490
|
+
django_restit-4.2.6.dist-info/RECORD,,
|
incident/models/rules.py
CHANGED
rest/__init__.py
CHANGED
File without changes
|
File without changes
|