diff --git a/server/middlewares/authentication.js b/server/middlewares/authentication.js index 16c9adc7..3fcf9b36 100644 --- a/server/middlewares/authentication.js +++ b/server/middlewares/authentication.js @@ -81,7 +81,11 @@ export default function auth(options?: { required?: boolean } = {}) { ctx.cache[user.id] = user; } - ctx.signIn = (user, team, service, isFirstSignin = false) => { + ctx.signIn = async (user, team, service, isFirstSignin = false) => { + if (user.isSuspended) { + return ctx.redirect('/?notice=suspended'); + } + // update the database when the user last signed in user.updateSignedIn(ctx.request.ip); diff --git a/server/pages/Home.js b/server/pages/Home.js index 654b3cb7..cef2f436 100644 --- a/server/pages/Home.js +++ b/server/pages/Home.js @@ -29,6 +29,7 @@ function Home(props: Props) { +

Your team’s knowledge base

Team wiki, documentation, meeting notes, playbooks, onboarding, work @@ -37,7 +38,6 @@ function Home(props: Props) {

-
diff --git a/server/pages/SubdomainSignin.js b/server/pages/SubdomainSignin.js index 987a0a8f..8c28df12 100644 --- a/server/pages/SubdomainSignin.js +++ b/server/pages/SubdomainSignin.js @@ -39,6 +39,7 @@ function SubdomainSignin({ +

{lastSignedIn ? 'Welcome back,' : 'Hey there,'}

Sign in with your team account to continue to {team.name}. @@ -51,7 +52,6 @@ function SubdomainSignin({ lastSignedIn={signinHint} />

-
diff --git a/server/pages/components/AuthErrors.js b/server/pages/components/AuthErrors.js index 6a6cf80c..bf42b2e0 100644 --- a/server/pages/components/AuthErrors.js +++ b/server/pages/components/AuthErrors.js @@ -27,6 +27,12 @@ export default function AuthErrors({ notice }: Props) { Please try again. )} + {notice === 'suspended' && ( + + Your Outline account has been suspended. To re-activate your account, + please contact a team admin. + + )} ); }