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

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

export function userHasIdentifiersAction(user: User | null, action: IdentifiersCatalogAction): boolean {
	return userHasPermission(user, `cat_identifiers.${action}`);
}
