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

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

export function userHasUmOmaAction(user: User | null, action: UmOmaCatalogAction): boolean {
	return userHasPermission(user, `cat_um_oma.${action}`);
}
