fix(settings): gate integration tabs by integration permissions

Prevent unauthorized users from seeing integrations they cannot use and keep settings routing consistent with API authorization behavior. Add hardcover_sync and enforce it server-side so tab visibility and endpoint access stay aligned.
This commit is contained in:
neon
2026-05-26 19:52:32 +00:00
parent 78b99d0b78
commit 3a72ece26d
10 changed files with 155 additions and 128 deletions
+2
View File
@@ -9,6 +9,7 @@ export enum Permission {
// Devices & Access
KoboSync = "kobo_sync",
KoreaderSync = "koreader_sync",
HardcoverSync = "hardcover_sync",
OpdsAccess = "opds_access",
BookDockAccess = "book_dock_access",
@@ -35,6 +36,7 @@ export const PERMISSION_LABELS: Record<Permission, string> = {
[Permission.DemoRestricted]: "Demo restricted",
[Permission.KoboSync]: "Kobo sync",
[Permission.KoreaderSync]: "KOReader sync",
[Permission.HardcoverSync]: "Hardcover sync",
[Permission.OpdsAccess]: "OPDS access",
[Permission.BookDockAccess]: "Book Dock",
[Permission.EmailSend]: "Send by email",