forked from unimatrix/web
Project central game rights and reuse native support department adapters
This commit is contained in:
parent
5291938c1a
commit
04532cb7ec
1 changed files with 103 additions and 8 deletions
7
website/node/organisation-native-projection.mjs
Normal file
7
website/node/organisation-native-projection.mjs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
const localPrivilegeEditors=new Set(['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}:{} )};
|
||||
}
|
||||
Loading…
Reference in a new issue

Staff