const localPrivilegeEditors=new Set(['web.forum.admin','web.tickets.admin','web.luckperms.edit','cp.luckperms.edit']); export function nativeAgentIdentity(user,access){ const centralHuman=access.organisation?.mode==='active'; return {...user,role:access.rank,ranks:access.ranks, permissions:centralHuman?access.nodes.filter(n=>!localPrivilegeEditors.has(n)):access.nodes, ...(centralHuman?{organisation:access.organisation,nativePermissionManagement:false}:{} )}; }