maquinaweb-shared-auth 0.2.33__tar.gz → 0.2.35__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.
Potentially problematic release.
This version of maquinaweb-shared-auth might be problematic. Click here for more details.
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/PKG-INFO +1 -1
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/maquinaweb_shared_auth.egg-info/PKG-INFO +1 -1
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/pyproject.toml +1 -1
- maquinaweb_shared_auth-0.2.35/shared_auth/__init__.py +6 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/router.py +1 -1
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/serializers.py +7 -0
- maquinaweb_shared_auth-0.2.33/shared_auth/__init__.py +0 -21
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/README.md +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/maquinaweb_shared_auth.egg-info/SOURCES.txt +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/maquinaweb_shared_auth.egg-info/dependency_links.txt +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/maquinaweb_shared_auth.egg-info/requires.txt +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/maquinaweb_shared_auth.egg-info/top_level.txt +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/setup.cfg +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/setup.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/abstract_models.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/app.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/authentication.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/conf.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/decorators.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/exceptions.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/fields.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/managers.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/middleware.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/mixins.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/models.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/permissions.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/storage_backend.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/urls.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/utils.py +0 -0
- {maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/views.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "maquinaweb-shared-auth"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.35"
|
|
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,7 +3,7 @@ class SharedAuthRouter:
|
|
|
3
3
|
Direciona queries dos models compartilhados para o banco correto
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
-
route_app_labels = {"shared_auth", "auth", "admin"}
|
|
6
|
+
route_app_labels = {"shared_auth", "auth", "admin", "contenttypes"}
|
|
7
7
|
|
|
8
8
|
def db_for_read(self, model, **hints):
|
|
9
9
|
if model._meta.app_label in self.route_app_labels:
|
|
@@ -28,6 +28,8 @@ class OrganizationCreateSerializerMixin(serializers.ModelSerializer):
|
|
|
28
28
|
fields = ['id', 'titulo', 'conteudo']
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
|
+
organization_id = serializers.IntegerField(required=False)
|
|
32
|
+
|
|
31
33
|
def create(self, validated_data):
|
|
32
34
|
"""Automatically set organization_id from request context"""
|
|
33
35
|
if self.context.get("request") and hasattr(
|
|
@@ -142,6 +144,8 @@ class UserCreateSerializerMixin(serializers.ModelSerializer):
|
|
|
142
144
|
fields = ['id', 'titulo', 'conteudo']
|
|
143
145
|
"""
|
|
144
146
|
|
|
147
|
+
user_id = serializers.IntegerField(required=False)
|
|
148
|
+
|
|
145
149
|
def create(self, validated_data):
|
|
146
150
|
"""Automatically set user_id from request context"""
|
|
147
151
|
if self.context.get("request") and hasattr(self.context["request"], "user"):
|
|
@@ -259,6 +263,9 @@ class OrganizationUserCreateSerializerMixin(serializers.ModelSerializer):
|
|
|
259
263
|
fields = ['id', 'titulo', 'conteudo']
|
|
260
264
|
"""
|
|
261
265
|
|
|
266
|
+
organization_id = serializers.IntegerField(required=False)
|
|
267
|
+
user_id = serializers.IntegerField(required=False)
|
|
268
|
+
|
|
262
269
|
def create(self, validated_data):
|
|
263
270
|
"""Automatically set both organization_id and user_id from request context"""
|
|
264
271
|
if self.context.get("request"):
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Biblioteca compartilhada para acesso aos models de autenticação
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
__version__ = '1.0.0'
|
|
6
|
-
default_app_config = "shared_auth.app.SharedAuthConfig"
|
|
7
|
-
|
|
8
|
-
# Exportar utilitários para facilitar importação
|
|
9
|
-
from .utils import (
|
|
10
|
-
get_member_model,
|
|
11
|
-
get_organization_model,
|
|
12
|
-
get_token_model,
|
|
13
|
-
get_user_model,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
__all__ = [
|
|
17
|
-
'get_token_model',
|
|
18
|
-
'get_organization_model',
|
|
19
|
-
'get_user_model',
|
|
20
|
-
'get_member_model',
|
|
21
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/abstract_models.py
RENAMED
|
File without changes
|
|
File without changes
|
{maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/authentication.py
RENAMED
|
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
|
{maquinaweb_shared_auth-0.2.33 → maquinaweb_shared_auth-0.2.35}/shared_auth/storage_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|