'use client'; import { useTranslations } from 'next-intl'; import { CustomModuleManager } from '@/components/custom-modules/custom-module-manager'; import { useAuthStore } from '@/lib/stores/auth-store'; /** * Verwaltung „Eigene Module“ (quick-260929-9wc, D-07, Vorbild * `admin/groups`; quick-260929-dzu: nur die GEMEINSAMEN Eintraege). ADMIN und * SUPER_ADMIN; die Rollenpruefung hier ist nur Anzeige — durchgesetzt wird sie * serverseitig: die API verlangt fuer gemeinsame Eintraege (`shared: true`, * Aendern, Loeschen) die Administrator-Rolle. Persoenliche Eintraege eines * Administrators stehen wie bei jedem Benutzer unter Einstellungen. */ export default function AdminCustomModulesPage() { const t = useTranslations('admin.customModules'); const tCommon = useTranslations('common'); const currentUser = useAuthStore((s) => s.user); const hasAccess = currentUser?.role === 'ADMIN' || currentUser?.role === 'SUPER_ADMIN'; if (!hasAccess) { return (

{tCommon('accessDenied')}

); } return ( ); }