build(deps): bump django from 3.1.7 to 3.2 (#707)
* build(deps): bump django from 3.1.7 to 3.2 Bumps [django](https://github.com/django/django) from 3.1.7 to 3.2. - [Release notes](https://github.com/django/django/releases) - [Commits](https://github.com/django/django/compare/3.1.7...3.2) Signed-off-by: dependabot[bot] <support@github.com> * root: set DEFAULT_AUTO_FIELD and remove full app config paths Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * *: check parent class for component and serializer on abstract classes Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
c5b56fd4e6
commit
17de0ff24e
|
@ -312,11 +312,11 @@
|
||||||
},
|
},
|
||||||
"django": {
|
"django": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:32ce792ee9b6a0cbbec340123e229ac9f765dff8c2a4ae9247a14b2ba3a365a7",
|
"sha256:0604e84c4fb698a5e53e5857b5aea945b2f19a18f25f10b8748dbdf935788927",
|
||||||
"sha256:baf099db36ad31f970775d0be5587cc58a6256a6771a44eb795b554d45f211b8"
|
"sha256:21f0f9643722675976004eb683c55d33c05486f94506672df3d6a141546f389d"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"version": "==3.1.7"
|
"version": "==3.2"
|
||||||
},
|
},
|
||||||
"django-dbbackup": {
|
"django-dbbackup": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
@ -67,12 +67,17 @@ class SourceViewSet(
|
||||||
data = []
|
data = []
|
||||||
for subclass in all_subclasses(self.queryset.model):
|
for subclass in all_subclasses(self.queryset.model):
|
||||||
subclass: Source
|
subclass: Source
|
||||||
|
component = ""
|
||||||
|
if subclass._meta.abstract:
|
||||||
|
component = subclass.__bases__[0]().component
|
||||||
|
else:
|
||||||
|
component = subclass().component
|
||||||
# pyright: reportGeneralTypeIssues=false
|
# pyright: reportGeneralTypeIssues=false
|
||||||
data.append(
|
data.append(
|
||||||
{
|
{
|
||||||
"name": subclass._meta.verbose_name,
|
"name": subclass._meta.verbose_name,
|
||||||
"description": subclass.__doc__,
|
"description": subclass.__doc__,
|
||||||
"component": subclass().component,
|
"component": component,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
return Response(TypeCreateSerializer(data, many=True).data)
|
return Response(TypeCreateSerializer(data, many=True).data)
|
||||||
|
|
|
@ -17,9 +17,13 @@ def model_tester_factory(test_model: Type[Stage]) -> Callable:
|
||||||
"""Test a form"""
|
"""Test a form"""
|
||||||
|
|
||||||
def tester(self: TestModels):
|
def tester(self: TestModels):
|
||||||
model_inst = test_model()
|
|
||||||
try:
|
try:
|
||||||
self.assertTrue(issubclass(model_inst.serializer, BaseSerializer))
|
model_class = None
|
||||||
|
if test_model._meta.abstract:
|
||||||
|
model_class = test_model.__bases__[0]()
|
||||||
|
else:
|
||||||
|
model_class = test_model()
|
||||||
|
self.assertTrue(issubclass(model_class.serializer, BaseSerializer))
|
||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,8 @@ AUTHENTICATION_BACKENDS = [
|
||||||
"guardian.backends.ObjectPermissionBackend",
|
"guardian.backends.ObjectPermissionBackend",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
"django.contrib.auth",
|
"django.contrib.auth",
|
||||||
|
@ -84,45 +86,45 @@ INSTALLED_APPS = [
|
||||||
"django.contrib.messages",
|
"django.contrib.messages",
|
||||||
"django.contrib.staticfiles",
|
"django.contrib.staticfiles",
|
||||||
"django.contrib.humanize",
|
"django.contrib.humanize",
|
||||||
"authentik.admin.apps.AuthentikAdminConfig",
|
"authentik.admin",
|
||||||
"authentik.api.apps.AuthentikAPIConfig",
|
"authentik.api",
|
||||||
"authentik.events.apps.AuthentikEventsConfig",
|
"authentik.events",
|
||||||
"authentik.crypto.apps.AuthentikCryptoConfig",
|
"authentik.crypto",
|
||||||
"authentik.flows.apps.AuthentikFlowsConfig",
|
"authentik.flows",
|
||||||
"authentik.outposts.apps.AuthentikOutpostConfig",
|
"authentik.outposts",
|
||||||
"authentik.lib.apps.AuthentikLibConfig",
|
"authentik.lib",
|
||||||
"authentik.policies.apps.AuthentikPoliciesConfig",
|
"authentik.policies",
|
||||||
"authentik.policies.dummy.apps.AuthentikPolicyDummyConfig",
|
"authentik.policies.dummy",
|
||||||
"authentik.policies.event_matcher.apps.AuthentikPoliciesEventMatcherConfig",
|
"authentik.policies.event_matcher",
|
||||||
"authentik.policies.expiry.apps.AuthentikPolicyExpiryConfig",
|
"authentik.policies.expiry",
|
||||||
"authentik.policies.expression.apps.AuthentikPolicyExpressionConfig",
|
"authentik.policies.expression",
|
||||||
"authentik.policies.hibp.apps.AuthentikPolicyHIBPConfig",
|
"authentik.policies.hibp",
|
||||||
"authentik.policies.password.apps.AuthentikPoliciesPasswordConfig",
|
"authentik.policies.password",
|
||||||
"authentik.policies.reputation.apps.AuthentikPolicyReputationConfig",
|
"authentik.policies.reputation",
|
||||||
"authentik.providers.proxy.apps.AuthentikProviderProxyConfig",
|
"authentik.providers.proxy",
|
||||||
"authentik.providers.oauth2.apps.AuthentikProviderOAuth2Config",
|
"authentik.providers.oauth2",
|
||||||
"authentik.providers.saml.apps.AuthentikProviderSAMLConfig",
|
"authentik.providers.saml",
|
||||||
"authentik.recovery.apps.AuthentikRecoveryConfig",
|
"authentik.recovery",
|
||||||
"authentik.sources.ldap.apps.AuthentikSourceLDAPConfig",
|
"authentik.sources.ldap",
|
||||||
"authentik.sources.oauth.apps.AuthentikSourceOAuthConfig",
|
"authentik.sources.oauth",
|
||||||
"authentik.sources.saml.apps.AuthentikSourceSAMLConfig",
|
"authentik.sources.saml",
|
||||||
"authentik.stages.authenticator_static.apps.AuthentikStageAuthenticatorStaticConfig",
|
"authentik.stages.authenticator_static",
|
||||||
"authentik.stages.authenticator_totp.apps.AuthentikStageAuthenticatorTOTPConfig",
|
"authentik.stages.authenticator_totp",
|
||||||
"authentik.stages.authenticator_validate.apps.AuthentikStageAuthenticatorValidateConfig",
|
"authentik.stages.authenticator_validate",
|
||||||
"authentik.stages.authenticator_webauthn.apps.AuthentikStageAuthenticatorWebAuthnConfig",
|
"authentik.stages.authenticator_webauthn",
|
||||||
"authentik.stages.captcha.apps.AuthentikStageCaptchaConfig",
|
"authentik.stages.captcha",
|
||||||
"authentik.stages.consent.apps.AuthentikStageConsentConfig",
|
"authentik.stages.consent",
|
||||||
"authentik.stages.deny.apps.AuthentikStageDenyConfig",
|
"authentik.stages.deny",
|
||||||
"authentik.stages.dummy.apps.AuthentikStageDummyConfig",
|
"authentik.stages.dummy",
|
||||||
"authentik.stages.email.apps.AuthentikStageEmailConfig",
|
"authentik.stages.email",
|
||||||
"authentik.stages.identification.apps.AuthentikStageIdentificationConfig",
|
"authentik.stages.identification",
|
||||||
"authentik.stages.invitation.apps.AuthentikStageUserInvitationConfig",
|
"authentik.stages.invitation",
|
||||||
"authentik.stages.password.apps.AuthentikStagePasswordConfig",
|
"authentik.stages.password",
|
||||||
"authentik.stages.prompt.apps.AuthentikStagePromptConfig",
|
"authentik.stages.prompt",
|
||||||
"authentik.stages.user_delete.apps.AuthentikStageUserDeleteConfig",
|
"authentik.stages.user_delete",
|
||||||
"authentik.stages.user_login.apps.AuthentikStageUserLoginConfig",
|
"authentik.stages.user_login",
|
||||||
"authentik.stages.user_logout.apps.AuthentikStageUserLogoutConfig",
|
"authentik.stages.user_logout",
|
||||||
"authentik.stages.user_write.apps.AuthentikStageUserWriteConfig",
|
"authentik.stages.user_write",
|
||||||
"rest_framework",
|
"rest_framework",
|
||||||
"django_filters",
|
"django_filters",
|
||||||
"drf_yasg",
|
"drf_yasg",
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
"""authentik ldap source signals"""
|
"""authentik ldap source signals"""
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from django.core.exceptions import ValidationError
|
|
||||||
from django.db.models.signals import post_save
|
from django.db.models.signals import post_save
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from ldap3.core.exceptions import LDAPException
|
from ldap3.core.exceptions import LDAPException
|
||||||
|
from rest_framework.serializers import ValidationError
|
||||||
|
|
||||||
from authentik.core.models import User
|
from authentik.core.models import User
|
||||||
from authentik.core.signals import password_changed
|
from authentik.core.signals import password_changed
|
||||||
|
|
Reference in New Issue