/**
 * Datos de referencia — permisos `ref_sectors.*` (seed_v2.py `permissions_reference`).
 * Solo lectura en seed actual; `action` reservado por si se amplía el CRUD.
 * Sectores (referencia)
 */
import type { User } from '$lib/auth';
import { userHasPermission } from '$lib/auth';

export type SectorsRefAction = 'view';

export function userHasSectorsRefAction(user: User | null, action: SectorsRefAction): boolean {
	return userHasPermission(user, `ref_sectors.${action}`);
}
