accrete 0.0.95__py3-none-any.whl → 0.0.96__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.
- accrete/middleware.py +6 -5
- {accrete-0.0.95.dist-info → accrete-0.0.96.dist-info}/METADATA +1 -1
- {accrete-0.0.95.dist-info → accrete-0.0.96.dist-info}/RECORD +5 -5
- {accrete-0.0.95.dist-info → accrete-0.0.96.dist-info}/WHEEL +0 -0
- {accrete-0.0.95.dist-info → accrete-0.0.96.dist-info}/licenses/LICENSE +0 -0
accrete/middleware.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from django.utils.deprecation import MiddlewareMixin
|
2
2
|
from django.conf import settings
|
3
3
|
from django.http.response import HttpResponseRedirect, HttpResponsePermanentRedirect
|
4
|
-
from accrete.tenant import set_tenant, set_member
|
4
|
+
from accrete.tenant import set_tenant, set_member, unscoped
|
5
5
|
|
6
6
|
from .models import Tenant
|
7
7
|
|
@@ -35,10 +35,11 @@ class TenantMiddleware(MiddlewareMixin):
|
|
35
35
|
return
|
36
36
|
|
37
37
|
if request.user.is_authenticated:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
with unscoped():
|
39
|
+
memberships = request.user.memberships.filter(
|
40
|
+
is_active=True,
|
41
|
+
tenant__is_active=True
|
42
|
+
)
|
42
43
|
|
43
44
|
if request.user.is_staff:
|
44
45
|
tenant_id = self.get_tenant_id_from_request(request)
|
@@ -5,7 +5,7 @@ accrete/apps.py,sha256=F7ynMLHJr_6bRujWtZVUzCliY2CGKiDvyUmL4F68L2E,146
|
|
5
5
|
accrete/config.py,sha256=eJUbvyBO3DvAD6xkVKjTAzlXy7V7EK9bVyb91girfUs,299
|
6
6
|
accrete/forms.py,sha256=2vUh80qNvPDD8Zl3agKBSJEQeY7bXVLOx_SAB34wf8E,1359
|
7
7
|
accrete/managers.py,sha256=vODaKmWPvgfRoYXbQ_JD-pRjd2QWM_a9Gjkllrua0WE,1164
|
8
|
-
accrete/middleware.py,sha256=
|
8
|
+
accrete/middleware.py,sha256=NhtT3YPq0EynAi4F81LLLUZd5rsWDjGVn1tkgUObT3M,3477
|
9
9
|
accrete/models.py,sha256=xliEVR0XPW46ZDJn3-F46s54tG9dxz7BVLbkq1pC144,5434
|
10
10
|
accrete/storage.py,sha256=z7pHdQFw0hFGrrbfqIh7KFxabQ_JGqoPebmiX9TLmeU,1254
|
11
11
|
accrete/tenant.py,sha256=g3ZuTrQr2zqmIopNBRQeCmHEK2R3dlUme_hOV765J6U,1778
|
@@ -232,7 +232,7 @@ accrete/utils/dates.py,sha256=apM6kt6JhGrKgoT0jfav1W-8AUVTxNc9xt3fJQ2n0JI,1492
|
|
232
232
|
accrete/utils/forms.py,sha256=IvxbXNpSd4a-JBgsTJhs2GHe-DCRWX-xnVPRcoiCzbI,3104
|
233
233
|
accrete/utils/models.py,sha256=EEhv7-sQVtQD24PEb3XcDUAh3VVhVFoMMLyFrDjGEaI,706
|
234
234
|
accrete/utils/views.py,sha256=iWZSYbd3qYMrV9wAsX26ofGb5wxn1N_nRrQ6s2lpp2I,4557
|
235
|
-
accrete-0.0.
|
236
|
-
accrete-0.0.
|
237
|
-
accrete-0.0.
|
238
|
-
accrete-0.0.
|
235
|
+
accrete-0.0.96.dist-info/METADATA,sha256=Cx1L2Ou3g8--jia4Wj_pSod1YvXufxA-vh9YdbjzMHw,4952
|
236
|
+
accrete-0.0.96.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
237
|
+
accrete-0.0.96.dist-info/licenses/LICENSE,sha256=_7laeMIHnsd3Y2vJEXDYXq_PEXxIcjgJsGt8UIKTRWc,1057
|
238
|
+
accrete-0.0.96.dist-info/RECORD,,
|
File without changes
|
File without changes
|