Support the read-only calendar role, show "Vorstand", fix link buttons
- Read-only role: /admin/me's permissions decide via canEditCalendar (lib/permissions.ts, mirrors the API's canWrite: only `access` writes). Read-only accounts see everything but get no "Neuer Termin", no "+", no "Veröffentlichen"; an event opens as "Termin ansehen" with locked fields. A "Nur lesen" badge in the header explains why. The API refuses their writes regardless. - The management calendar is labelled "Vorstand"; the slug stays `management` for the API, URLs and iCal links. - The subscription dialog's Apple/Google links are plain anchors styled with buttonVariants instead of Base UI Buttons rendering an <a>, which warned in dev and would have given them role="button". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
16 files changed
+155
-32
No files matched your search
@@ -82,5 +82,12 @@ export interface AdminUser {
|
||||
id: string;
|
||||
email: string;
|
||||
fullName: string;
|
||||
/** The distinct apps the account may open at all, whatever the role. */
|
||||
apps: string[];
|
||||
/**
|
||||
* The full (app, role) grants: `access` = may change things, `read` = may only
|
||||
* look. Missing on an API from before the read-only role (2026-10-29).
|
||||
* See lib/permissions.ts.
|
||||
*/
|
||||
permissions?: { app: string; role: string }[];
|
||||
}
|
||||
Reference in new issue
Block a user