feat: add support for disabling specific tools in self-hosting

- Introduced build-time and runtime options to disable tools for compliance or security.
- Updated documentation to include instructions for disabling tools in Docker and Kubernetes setups.
- Added translations for disabled tool messages in multiple languages.
- Implemented logic to filter out disabled tools from the toolbox and shortcuts in the application.
- Created utility functions to manage disabled tools configuration.
This commit is contained in:
alam00000
2026-03-28 23:45:17 +05:30
parent 59ebb4d358
commit 9a7cf1636b
30 changed files with 417 additions and 7 deletions

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "أدوات PDF",
"subtitle": "اختر أداة للبدء"
},
"disabledTool": {
"title": "الأداة غير متاحة",
"heading": "هذه الأداة معطّلة",
"message": "هذه الأداة غير متوفرة في بيئة النشر الخاصة بك. تواصل مع المسؤول للحصول على مزيد من المعلومات.",
"backHome": "العودة إلى الرئيسية"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Інструменты PDF",
"subtitle": "Выберыце інструмент, каб пачаць"
},
"disabledTool": {
"title": "Інструмент недаступны",
"heading": "Гэты інструмент адключаны",
"message": "Гэты інструмент недаступны ў вашым разгортванні. Звяжыцеся з адміністратарам для атрымання дадатковай інфармацыі.",
"backHome": "Вярнуцца на галоўную"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF-værktøjer",
"subtitle": "Vælg et værktøj for at komme i gang"
},
"disabledTool": {
"title": "Værktøj utilgængeligt",
"heading": "Dette værktøj er deaktiveret",
"message": "Dette værktøj er ikke tilgængeligt i din installation. Kontakt din administrator for yderligere oplysninger.",
"backHome": "Tilbage til forsiden"
}
}

View File

@@ -362,5 +362,11 @@
"simpleMode": {
"title": "PDF-Werkzeuge",
"subtitle": "Wählen Sie ein Werkzeug aus, um zu beginnen"
},
"disabledTool": {
"title": "Werkzeug nicht verfügbar",
"heading": "Dieses Werkzeug wurde deaktiviert",
"message": "Dieses Werkzeug ist in Ihrer Installation nicht verfügbar. Wenden Sie sich an Ihren Administrator, um weitere Informationen zu erhalten.",
"backHome": "Zurück zur Startseite"
}
}

View File

@@ -363,5 +363,11 @@
"simpleMode": {
"title": "PDF Tools",
"subtitle": "Select a tool to get started"
},
"disabledTool": {
"title": "Tool Unavailable",
"heading": "This tool has been disabled",
"message": "This tool is not available in your deployment. Contact your administrator for more information.",
"backHome": "Back to Home"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Herramientas PDF",
"subtitle": "Selecciona una herramienta para comenzar"
},
"disabledTool": {
"title": "Herramienta no disponible",
"heading": "Esta herramienta ha sido desactivada",
"message": "Esta herramienta no está disponible en tu instalación. Contacta con tu administrador para obtener más información.",
"backHome": "Volver al inicio"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Outils PDF",
"subtitle": "Sélectionnez un outil pour commencer"
},
"disabledTool": {
"title": "Outil indisponible",
"heading": "Cet outil a été désactivé",
"message": "Cet outil n'est pas disponible dans votre déploiement. Contactez votre administrateur pour plus d'informations.",
"backHome": "Retour à l'accueil"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Alat PDF",
"subtitle": "Pilih alat untuk memulai"
},
"disabledTool": {
"title": "Alat Tidak Tersedia",
"heading": "Alat ini telah dinonaktifkan",
"message": "Alat ini tidak tersedia dalam penerapan Anda. Hubungi administrator Anda untuk informasi lebih lanjut.",
"backHome": "Kembali ke Beranda"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Strumenti PDF",
"subtitle": "Seleziona uno strumento per iniziare"
},
"disabledTool": {
"title": "Strumento Non Disponibile",
"heading": "Questo strumento è stato disabilitato",
"message": "Questo strumento non è disponibile nella tua distribuzione. Contatta il tuo amministratore per ulteriori informazioni.",
"backHome": "Torna alla Home"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF 도구",
"subtitle": "사용할 도구를 선택하세요"
},
"disabledTool": {
"title": "도구를 사용할 수 없음",
"heading": "이 도구는 비활성화되었습니다",
"message": "이 도구는 현재 배포 환경에서 사용할 수 없습니다. 자세한 내용은 관리자에게 문의하세요.",
"backHome": "홈으로 돌아가기"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF-tools",
"subtitle": "Selecteer een tool om te beginnen"
},
"disabledTool": {
"title": "Tool Niet Beschikbaar",
"heading": "Deze tool is uitgeschakeld",
"message": "Deze tool is niet beschikbaar in uw implementatie. Neem contact op met uw beheerder voor meer informatie.",
"backHome": "Terug naar Home"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Ferramentas PDF",
"subtitle": "Selecione uma ferramenta para começar"
},
"disabledTool": {
"title": "Ferramenta Indisponível",
"heading": "Esta ferramenta foi desativada",
"message": "Esta ferramenta não está disponível na sua implantação. Entre em contato com o seu administrador para mais informações.",
"backHome": "Voltar para o Início"
}
}

View File

@@ -357,5 +357,11 @@
"errorRendering": "Не удалось отрисовать миниатюры страниц",
"error": "Ошибка",
"failedToLoad": "Не удалось загрузить"
},
"disabledTool": {
"title": "Инструмент недоступен",
"heading": "Этот инструмент отключён",
"message": "Этот инструмент недоступен в вашей конфигурации. Обратитесь к администратору для получения дополнительной информации.",
"backHome": "На главную"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF-verktyg",
"subtitle": "Välj ett verktyg för att komma igång"
},
"disabledTool": {
"title": "Verktyget är inte tillgängligt",
"heading": "Det här verktyget har inaktiverats",
"message": "Det här verktyget är inte tillgängligt i din installation. Kontakta din administratör för mer information.",
"backHome": "Tillbaka till startsidan"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF Araçları",
"subtitle": "Başlamak için bir araç seçin"
},
"disabledTool": {
"title": "Araç Kullanılamıyor",
"heading": "Bu araç devre dışı bırakıldı",
"message": "Bu araç, dağıtımınızda mevcut değil. Daha fazla bilgi için yöneticinizle iletişime geçin.",
"backHome": "Ana Sayfaya Dön"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "Công cụ PDF",
"subtitle": "Chọn một công cụ để bắt đầu"
},
"disabledTool": {
"title": "Công cụ không khả dụng",
"heading": "Công cụ này đã bị vô hiệu hóa",
"message": "Công cụ này không có sẵn trong môi trường triển khai của bạn. Vui lòng liên hệ quản trị viên để biết thêm thông tin.",
"backHome": "Quay về trang chủ"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF 工具",
"subtitle": "選擇一個工具開始使用"
},
"disabledTool": {
"title": "工具無法使用",
"heading": "此工具已被停用",
"message": "此工具在您的部署環境中無法使用。請聯絡管理員以取得更多資訊。",
"backHome": "返回首頁"
}
}

View File

@@ -361,5 +361,11 @@
"simpleMode": {
"title": "PDF 工具",
"subtitle": "选择一个工具开始使用"
},
"disabledTool": {
"title": "工具不可用",
"heading": "此工具已被禁用",
"message": "此工具在您的部署环境中不可用。请联系管理员以获取更多信息。",
"backHome": "返回首页"
}
}