maquinaweb-shared-auth 0.1.4__py3-none-any.whl → 0.1.5__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.4
3
+ Version: 0.1.5
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
@@ -1,17 +1,18 @@
1
1
  shared_auth/__init__.py,sha256=WbDmRRdOp0nn5I_ksYjhAa2HRtXe0wxtGY6qnaiPlB8,397
2
+ shared_auth/app.py,sha256=aOgzojmmabOvWfNqw7YFaM6L_dB8lsnF_No5HiRTFPk,152
2
3
  shared_auth/authentication.py,sha256=btrTjBszPrKKfKA4F0pOOzaxnfASgXb1y2cxQwOWbnk,1515
3
4
  shared_auth/conf.py,sha256=-jdnCokMvWvVKllfsxNYCsPk1Vo3MDRq4Y1MsO16oeA,411
4
5
  shared_auth/decorators.py,sha256=LTDHiVX36O65jbcCUqtoNPNkQ1suDH4fICXVyduZ1BM,3444
5
6
  shared_auth/exceptions.py,sha256=eiII-REupK6GeFinisteYO3FsGUDAN5zAajXPhTREm8,404
6
7
  shared_auth/fields.py,sha256=RAcmFh1D_nkbai_7t_OrPZhfhAipesy5kKnEj4LUvvM,1254
7
- shared_auth/managers.py,sha256=NfMhsAFuVmo8MUY2fveB_xVAT5_67nlkVOXS_C8bhew,6920
8
+ shared_auth/managers.py,sha256=yPv40NxoOWyrJygLt6xYAHGAlKcvOYGRoUb6zKqLm4Y,7041
8
9
  shared_auth/middleware.py,sha256=OycDHgHh-1GkicU91xDaxXw_AR43JeQn8PsJXm4w_3E,5979
9
10
  shared_auth/mixins.py,sha256=3ARghQ4TvtENKoA5UTOHTrRHa6ufMRVJJHGFkV8-BL8,7550
10
11
  shared_auth/models.py,sha256=iszFHOhpD78tqcXaxxZ9_57wLdRq9i_ZsHWrfy5W9Nc,6997
11
12
  shared_auth/permissions.py,sha256=kkEMtClmV9VB3EOhKDyinSr4r5v9g-3DCCKNtqpaTz8,2473
12
13
  shared_auth/router.py,sha256=nYbqnqjoylD0yeSY7rqyH8N4H6j1MHYD2sMnrhi3sm4,646
13
14
  shared_auth/serializers.py,sha256=TDpuZVsOL-6igINSOOOyELWbTUeet4XWRoBkvcMGjW4,4290
14
- maquinaweb_shared_auth-0.1.4.dist-info/METADATA,sha256=nzMW_SX5YSnQrtpPH-f33d1jXc8_bmG6XHVnlKvy-OU,27150
15
- maquinaweb_shared_auth-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- maquinaweb_shared_auth-0.1.4.dist-info/top_level.txt,sha256=msyYRy02ZV7zz7GR1raUI5LXGFIFn2TIkgkeKZqKufE,12
17
- maquinaweb_shared_auth-0.1.4.dist-info/RECORD,,
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,,
shared_auth/app.py ADDED
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+
4
+ class SharedAuthConfig(AppConfig):
5
+ default_auto_field = "django.db.models.BigAutoField"
6
+ name = "shared_auth"
shared_auth/managers.py CHANGED
@@ -3,8 +3,6 @@ Managers customizados para os models compartilhados
3
3
  """
4
4
 
5
5
  from django.db import models
6
-
7
- from . import SharedOrganization, SharedUser, SharedMember
8
6
  from .exceptions import OrganizationNotFoundError, UserNotFoundError
9
7
 
10
8
 
@@ -95,7 +93,7 @@ class OrganizationQuerySetMixin:
95
93
  Lista de objetos com _cached_organization
96
94
  """
97
95
  objects = list(self.all())
98
-
96
+ from . import SharedOrganization
99
97
  if not objects:
100
98
  return objects
101
99
 
@@ -132,6 +130,7 @@ class UserQuerySetMixin:
132
130
  """
133
131
  Pré-carrega dados de usuários (evita N+1)
134
132
  """
133
+ from . import SharedUser
135
134
  objects = list(self.all())
136
135
 
137
136
  if not objects:
@@ -157,6 +156,7 @@ class OrganizationUserQuerySetMixin(OrganizationQuerySetMixin, UserQuerySetMixin
157
156
  """
158
157
  Pré-carrega dados de organizações E usuários (evita N+1)
159
158
  """
159
+ from . import SharedOrganization, SharedUser
160
160
  objects = list(self.all())
161
161
 
162
162
  if not objects:
@@ -190,6 +190,7 @@ class OrganizationUserQuerySetMixin(OrganizationQuerySetMixin, UserQuerySetMixin
190
190
  """
191
191
  Cria objeto com validação de organização e usuário
192
192
  """
193
+ from . import SharedOrganization, SharedMember
193
194
  # Valida organização
194
195
  SharedOrganization.objects.using("auth_db").get_or_fail(organization_id)
195
196