Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

feat(login): hide registration link when registration is disabled (#795)

Corentin Thomasset3a4153116c61
diff --git a/.changeset/ninety-lamps-drive.md b/.changeset/ninety-lamps-drive.md
new file mode 100644
index 00000000..9c152374
--- /dev/null
+++ b/.changeset/ninety-lamps-drive.md
@@ -0,0 +1,5 @@
+---
+"@papra/docker": patch
+---
+
+Hide the "Don't have an account? Register" link on the login page when new account registration is disabled.
\ No newline at end of file
diff --git a/apps/papra-client/src/modules/auth/pages/login.page.tsx b/apps/papra-client/src/modules/auth/pages/login.page.tsx
index 661adad8..a9b1edbb 100644
--- a/apps/papra-client/src/modules/auth/pages/login.page.tsx
+++ b/apps/papra-client/src/modules/auth/pages/login.page.tsx
@@ -345,13 +345,15 @@ export const LoginPage: Component = () => {
</div>
</Show>
- <p class="text-muted-foreground mt-4">
- {t('auth.login.no-account')}
- {' '}
- <Button variant="link" as={A} class="inline px-0" href="/register">
- {t('auth.login.register')}
- </Button>
- </p>
+ <Show when={config.auth.isRegistrationEnabled}>
+ <p class="text-muted-foreground mt-4">
+ {t('auth.login.no-account')}
+ {' '}
+ <Button variant="link" as={A} class="inline px-0" href="/register">
+ {t('auth.login.register')}
+ </Button>
+ </p>
+ </Show>
<AuthLegalLinks />
</Show>