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

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

export function userHasUmAceAction(user: User | null, action: UmAceCatalogAction): boolean {
	return userHasPermission(user, `cat_um_ace.${action}`);
}
