/**
 * Catálogo general — permisos `cat_doda.*` (`permissions_general` en seed_v2.py).
 * DODA
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

export type DodaCatalogAction = 'view' | 'create' | 'edit' | 'delete';

export function userHasDodaCatalogAction(user: User | null, action: DodaCatalogAction): boolean {
	return userHasPermission(user, `cat_doda.${action}`);
}
