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'; const supportOwner=centralHuman&&access.ranks.includes('org_owner_ceo'); return {...user,role:access.rank,ranks:access.ranks, permissions:centralHuman?access.nodes.filter(n=>!localPrivilegeEditors.has(n)||supportOwner&&n==='web.tickets.admin'):access.nodes, ...(centralHuman?{organisation:access.organisation,nativePermissionManagement:false}:{} )}; }