maquinaweb-shared-auth 0.1.5__py3-none-any.whl → 0.1.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.

Potentially problematic release.


This version of maquinaweb-shared-auth might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maquinaweb-shared-auth
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Models read-only para autenticação compartilhada entre projetos Django.
5
5
  Author-email: Seu Nome <seuemail@dominio.com>
6
6
  License: MIT
@@ -6,13 +6,13 @@ shared_auth/decorators.py,sha256=LTDHiVX36O65jbcCUqtoNPNkQ1suDH4fICXVyduZ1BM,344
6
6
  shared_auth/exceptions.py,sha256=eiII-REupK6GeFinisteYO3FsGUDAN5zAajXPhTREm8,404
7
7
  shared_auth/fields.py,sha256=RAcmFh1D_nkbai_7t_OrPZhfhAipesy5kKnEj4LUvvM,1254
8
8
  shared_auth/managers.py,sha256=yPv40NxoOWyrJygLt6xYAHGAlKcvOYGRoUb6zKqLm4Y,7041
9
- shared_auth/middleware.py,sha256=OycDHgHh-1GkicU91xDaxXw_AR43JeQn8PsJXm4w_3E,5979
9
+ shared_auth/middleware.py,sha256=y2blhI44nJL39UqyOxBgJjiafwuZEb7G0Zlvfge6rlo,6068
10
10
  shared_auth/mixins.py,sha256=3ARghQ4TvtENKoA5UTOHTrRHa6ufMRVJJHGFkV8-BL8,7550
11
11
  shared_auth/models.py,sha256=iszFHOhpD78tqcXaxxZ9_57wLdRq9i_ZsHWrfy5W9Nc,6997
12
12
  shared_auth/permissions.py,sha256=kkEMtClmV9VB3EOhKDyinSr4r5v9g-3DCCKNtqpaTz8,2473
13
- shared_auth/router.py,sha256=nYbqnqjoylD0yeSY7rqyH8N4H6j1MHYD2sMnrhi3sm4,646
13
+ shared_auth/router.py,sha256=SbM5YEoxxg2zMns1kfFmsK9YrgqqVfc4-riniYY7rbQ,651
14
14
  shared_auth/serializers.py,sha256=TDpuZVsOL-6igINSOOOyELWbTUeet4XWRoBkvcMGjW4,4290
15
- maquinaweb_shared_auth-0.1.5.dist-info/METADATA,sha256=2yk-9aGf63QRReKuzLrZlTKxVW6JDQ_pPpgbM6epz_s,27150
16
- maquinaweb_shared_auth-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- maquinaweb_shared_auth-0.1.5.dist-info/top_level.txt,sha256=msyYRy02ZV7zz7GR1raUI5LXGFIFn2TIkgkeKZqKufE,12
18
- maquinaweb_shared_auth-0.1.5.dist-info/RECORD,,
15
+ maquinaweb_shared_auth-0.1.6.dist-info/METADATA,sha256=5iR99adsbbr8A5lCgPUrMDsfACRDdJyUnq1E48Jlc7w,27150
16
+ maquinaweb_shared_auth-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
+ maquinaweb_shared_auth-0.1.6.dist-info/top_level.txt,sha256=msyYRy02ZV7zz7GR1raUI5LXGFIFn2TIkgkeKZqKufE,12
18
+ maquinaweb_shared_auth-0.1.6.dist-info/RECORD,,
shared_auth/middleware.py CHANGED
@@ -158,7 +158,8 @@ class OrganizationMiddleware(MiddlewareMixin):
158
158
 
159
159
  request.organization_id = organization_id
160
160
  request.organization = SharedOrganization.objects.get_or_fail(organization_id)
161
-
161
+ request.user.logged_organization_id = organization_id
162
+ request.user.save()
162
163
  @staticmethod
163
164
  def _authenticate_user(request):
164
165
  data = SharedTokenAuthentication().authenticate(request)
shared_auth/router.py CHANGED
@@ -12,7 +12,7 @@ class SharedAuthRouter:
12
12
 
13
13
  def db_for_write(self, model, **hints):
14
14
  if model._meta.app_label in self.route_app_labels:
15
- return None
15
+ return "auth_db"
16
16
  return None
17
17
 
18
18
  def allow_migrate(self, db, app_label, model_name=None, **hints):