Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

minor improvement

daniel31x13d1c3748681fe
diff --git a/.env.sample b/.env.sample
index 775b05d7..c34fff22 100644
--- a/.env.sample
+++ b/.env.sample
@@ -36,7 +36,6 @@ PREVIEW_MAX_BUFFER=
IMPORT_LIMIT=
PLAYWRIGHT_LAUNCH_OPTIONS_EXECUTABLE_PATH=
MAX_WORKERS=
-DISABLE_INVITES=
# AWS S3 Settings
SPACES_KEY=
diff --git a/lib/api/controllers/users/postUser.ts b/lib/api/controllers/users/postUser.ts
index f77e3c07..b299a636 100644
--- a/lib/api/controllers/users/postUser.ts
+++ b/lib/api/controllers/users/postUser.ts
@@ -22,8 +22,6 @@ export default async function postUser(
const isAdmin =
parentUser && parentUser.id === Number(process.env.NEXT_PUBLIC_ADMIN || 1);
- const DISABLE_INVITES = process.env.DISABLE_INVITES === "true";
-
if (process.env.NEXT_PUBLIC_DISABLE_REGISTRATION === "true" && !isAdmin) {
return { response: "Registration is disabled.", status: 400 };
}
@@ -42,7 +40,7 @@ export default async function postUser(
const { name, email, password, invite } = dataValidation.data;
let { username } = dataValidation.data;
- if (invite && (DISABLE_INVITES || !emailEnabled)) {
+ if (invite && (!stripeEnabled || !emailEnabled)) {
return { response: "You are not authorized to invite users.", status: 401 };
} else if (invite && !parentUser) {
return { response: "You must be logged in to invite users.", status: 401 };