maquinaweb-shared-auth 0.1.4__tar.gz → 0.1.5__tar.gz
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.
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/PKG-INFO +1 -1
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/maquinaweb_shared_auth.egg-info/PKG-INFO +1 -1
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/maquinaweb_shared_auth.egg-info/SOURCES.txt +1 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/pyproject.toml +1 -1
- maquinaweb_shared_auth-0.1.5/shared_auth/app.py +6 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/managers.py +4 -3
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/README.md +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/maquinaweb_shared_auth.egg-info/dependency_links.txt +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/maquinaweb_shared_auth.egg-info/requires.txt +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/maquinaweb_shared_auth.egg-info/top_level.txt +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/setup.cfg +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/setup.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/__init__.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/authentication.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/conf.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/decorators.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/exceptions.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/fields.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/middleware.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/mixins.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/models.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/permissions.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/router.py +0 -0
- {maquinaweb_shared_auth-0.1.4 → maquinaweb_shared_auth-0.1.5}/shared_auth/serializers.py +0 -0
|
@@ -7,6 +7,7 @@ maquinaweb_shared_auth.egg-info/dependency_links.txt
|
|
|
7
7
|
maquinaweb_shared_auth.egg-info/requires.txt
|
|
8
8
|
maquinaweb_shared_auth.egg-info/top_level.txt
|
|
9
9
|
shared_auth/__init__.py
|
|
10
|
+
shared_auth/app.py
|
|
10
11
|
shared_auth/authentication.py
|
|
11
12
|
shared_auth/conf.py
|
|
12
13
|
shared_auth/decorators.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "maquinaweb-shared-auth"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.5"
|
|
8
8
|
description = "Models read-only para autenticação compartilhada entre projetos Django."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.13"
|
|
@@ -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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|