diff --git a/frontend/src/pages/accounts/account_inactive.module.scss b/frontend/src/pages/accounts/account_inactive.module.scss new file mode 100644 index 0000000000..4346c56bed --- /dev/null +++ b/frontend/src/pages/accounts/account_inactive.module.scss @@ -0,0 +1,6 @@ +@import "~@mozilla-protocol/core/protocol/css/includes/lib"; + +.error { + background-color: $color-red-60; + color: $color-white; +} diff --git a/frontend/src/pages/accounts/account_inactive.page.tsx b/frontend/src/pages/accounts/account_inactive.page.tsx new file mode 100644 index 0000000000..9719dc376a --- /dev/null +++ b/frontend/src/pages/accounts/account_inactive.page.tsx @@ -0,0 +1,14 @@ +import type { NextPage } from "next"; + +import { Layout } from "../../components/layout/Layout"; +import styles from "./account_inactive.module.scss"; + +const AccountInactive: NextPage = () => { + return ( + +
This account is not active.
+
+ ); +}; + +export default AccountInactive; diff --git a/privaterelay/allauth.py b/privaterelay/allauth.py index 0d72246bcc..2db0478cac 100644 --- a/privaterelay/allauth.py +++ b/privaterelay/allauth.py @@ -2,7 +2,7 @@ from urllib.parse import urlencode, urlparse from django.http import Http404 -from django.shortcuts import resolve_url +from django.shortcuts import redirect, resolve_url from django.urls import resolve from allauth.account.adapter import DefaultAccountAdapter @@ -54,3 +54,6 @@ def is_safe_url(self, url: str | None) -> bool: # The path is invalid logger.error("No matching URL for '%s'", url) return False + + def respond_user_inactive(self, request, user): + return redirect("/accounts/account_inactive/")