Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update login exception handle #2116

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion saas/backend/account/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,3 @@ def _handle_exception(self, e):
message = e.message[idx + len(msg_prefix) : -1]

raise PermissionForbidden(message)

3 changes: 2 additions & 1 deletion saas/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

# Monkey Patch: rest_framework.serializers.Serializer
import backend.util.serializer_patch # noqa
from backend.common.views import login_exempt
from backend.common.vue import LoginSuccessView, VueTemplateView

schema_view = get_schema_view(
Expand Down Expand Up @@ -86,5 +87,5 @@
# static file
urlpatterns += [
url(r"^login_success/", never_cache(LoginSuccessView.as_view())),
url(r"^.*$", never_cache(VueTemplateView.as_view())),
url(r"^.*$", never_cache(login_exempt(VueTemplateView.as_view()))),
]