forked from unimatrix/web
7 lines
472 B
JavaScript
7 lines
472 B
JavaScript
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}:{} )};
|
|
}
|

Staff