fix: After enabling application access authentication, closing the public access connection will still display the application login page (#3675)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-07-18 18:43:36 +08:00 committed by GitHub
parent 6e16c74a5e
commit 4cf2b74cb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,6 +59,8 @@ class AuthProfileSerializer(serializers.Serializer):
application_access_token = QuerySet(ApplicationAccessToken).filter(access_token=access_token).first()
if application_access_token is None:
raise NotFound404(404, _("Invalid access_token"))
if not application_access_token.is_active:
raise NotFound404(404, _("Invalid access_token"))
application_id = application_access_token.application_id
profile = {
'authentication': False