mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user