diff --git a/public/locales/en-US/translation.json b/public/locales/en-US/translation.json
index f67df95..31836e9 100644
--- a/public/locales/en-US/translation.json
+++ b/public/locales/en-US/translation.json
@@ -383,6 +383,10 @@
"allowStatistics": {
"label": "Allow statistics",
"description": "If enabled, your instance will collect anonymous statistics and share them. They will only be stored locally on this instance but made public."
+ },
+ "allowAliasDeletion": {
+ "label": "Allow alias deletion",
+ "description": "If enabled, users will be able to delete their aliases."
}
}
},
diff --git a/src/constants/admin-settings.ts b/src/constants/admin-settings.ts
index 5d340a0..b85bf6b 100644
--- a/src/constants/admin-settings.ts
+++ b/src/constants/admin-settings.ts
@@ -11,4 +11,5 @@ export const DEFAULT_ADMIN_SETTINGS: AdminSettings = {
imageProxyStorageLifeTimeInHours: 24,
enableImageProxy: true,
allowStatistics: true,
+ allowAliasDeletion: false,
}
diff --git a/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx b/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx
index 5207c2f..e38c6fc 100644
--- a/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx
+++ b/src/route-widgets/GlobalSettingsRoute/SettingsForm.tsx
@@ -488,6 +488,35 @@ export default function SettingsForm({settings, queryKey}: SettingsFormProps) {
+
+
+
+ }
+ disabled={formik.isSubmitting}
+ label={t(
+ "routes.AdminRoute.forms.settings.allowAliasDeletion.label",
+ )}
+ />
+
+ {(formik.touched.allowAliasDeletion &&
+ formik.errors.allowAliasDeletion) ||
+ t(
+ "routes.AdminRoute.forms.settings.allowAliasDeletion.description",
+ )}
+
+
+
diff --git a/src/server-types.ts b/src/server-types.ts
index 6aa8310..0b2a5df 100644
--- a/src/server-types.ts
+++ b/src/server-types.ts
@@ -210,4 +210,5 @@ export interface AdminSettings {
userEmailEnableDisposableEmails: boolean
userEmailEnableOtherRelays: boolean | null
allowStatistics: boolean | null
+ allowAliasDeletion: boolean | null
}