MC/website/node/passive-order-policy.mjs
2026-11-27 23:43:05 +00:00

6 lines
1.1 KiB
JavaScript

// Reusable institutional deed policy. Capabilities are explicit, never inherited wholesale.
export const PASSIVE_ORDER_POLICY=Object.freeze({type:'passive-order',kind:'politics',passive:true,claims:true,privateBoards:true,pvp:false,conquest:false,war:false,electionSeat:false,extraVotes:false,decisions:false});
export const CRYSKNIFE_DEED_POLICY=Object.freeze({...PASSIVE_ORDER_POLICY,institution:'order-crysknife',parentOffice:'emperor',leaderFixed:true,parentCapabilities:Object.freeze(['motd.edit','account.view','account.pay'])});
export function passiveOrderCapabilities({member=false,localLeader=false,parentOfficeholder=false}={}){
return Object.freeze({readBoards:member===true,postBoards:member===true,manageBoards:member===true&&localLeader===true,editMotd:localLeader===true||parentOfficeholder===true,viewAccount:localLeader===true||parentOfficeholder===true,payFromAccount:localLeader===true||parentOfficeholder===true,manageMembers:localLeader===true,manageClaims:localLeader===true,replaceLeader:false,changeParent:false,changePassiveStatus:false,pvp:false,conquest:false,war:false,electionSeat:false,extraVotes:false});
}