export type PermissionSection = "club" | "settings" | "user"; export type PermissionModule = | "members" | "calendar" | "newsletter" | "protocoll" | "qualification" | "award" | "executive_position" | "communication" | "user" | "role"; export type PermissionType = "create" | "read" | "update" | "delete"; export type PermissionString = | `${PermissionSection}.${PermissionModule}.${PermissionType}` // für spezifische Berechtigungen | `${PermissionSection}.${PermissionModule}.*` // für alle Berechtigungen in einem Modul | `${PermissionSection}.${PermissionType}` // für spezifische Berechtigungen in einem Abschnitt | `${PermissionSection}.*` // für alle Berechtigungen in einem Abschnitt | "*"; // für Admin export type PermissionObject = { [section in PermissionSection]?: { [module in PermissionModule]?: Array | "*"; } & { all?: PermissionType | "*" }; } & { admin?: boolean; };