29 lines
10 KiB
JavaScript
29 lines
10 KiB
JavaScript
import {identity} from '../node/auth.mjs';
|
||
import {can} from '../node/permissions.mjs';
|
||
import {json} from '../node/game-link.mjs';
|
||
|
||
// Describe verified behaviour separately from work awaiting integration and deployment.
|
||
export const STAFF_MANUAL=[
|
||
{id:'luckperms',title:'LuckPerms game permissions',module:'LuckPerms · native editor',status:'Available',nodes:['web.menu.luckperms','web.luckperms.view','web.luckperms.edit'],steps:['Open LuckPerms to see every live in-game group. Owners can create a private native editor session below the group list.','The advanced editor manages manual game permissions, inheritance, prefixes and suffixes. Canonical website team grants are managed separately by the Game permissions page.','Use the trust or apply command supplied by the editor only when you want to authorise that browser or apply your changes.','In game, /duneperms and /dunelp forward to LuckPerms. Its luckperms.* permission checks remain unchanged.'],checks:['The full editor requires Owners rank and web.luckperms.edit. The page and group list have separate web.menu.luckperms and web.luckperms.view gates.','Website permissions use web.feature.action. The separate Game permissions page exports allowlisted grants for verified Minecraft UUIDs through managed LuckPerms groups.','Keep private editor session addresses to yourself. The native editor retains its original LuckPerms credits.']},
|
||
{id:'permissions',title:'Permissions & ranks',module:'Website accounts',status:'Available',nodes:['web.menu.permissions','web.ranks.manage','web.accounts.assign'],steps:['Open Website ranks. Choose a rank column and tick the permissions it should receive. Save that column.','Corestaff can create and manage ranks below their own level. Owners are protected against demotion through this page.','Website and Game permissions are separate pages for the same canonical ranks. Houses and elected offices remain derived from authoritative game state.'],checks:['Saved website rights apply to subsequent requests. Rank, permission and link changes trigger a managed game-group update; unrelated manual LuckPerms settings are preserved.','Use a separate test account to check the result before changing staff access.']},
|
||
{id:'coreprotect',title:'CoreProtect',module:'DuneProtect / CoreProtect',status:'Available',nodes:['duneprotect.inspect','duneprotect.lookup','duneprotect.rollback','duneprotect.restore'],steps:['Record the location, time window and suspected player before looking up changes.','Inspect the relevant history before selecting a rollback. Keep the affected area and time window as small as practical.','Preview the proposed changes using the installed CoreProtect tools before applying a rollback or restore.'],checks:['Use /duneprotect inspect, lookup, rollback or restore. Both the duneprotect feature node and the native CoreProtect permission are required.','CoreProtect is the history backend; WorldEdit and WorldGuard have different purposes.']},
|
||
{id:'worldedit',title:'WorldEdit',module:'DuneProtect / WorldEdit',status:'Available',nodes:['duneprotect.worldedit'],steps:['Select the intended area and check the selection boundaries.','Make a backup before a large edit. Check the result before leaving the area.'],checks:['WorldEdit is for building and editing. It is not a substitute for investigating player changes with CoreProtect.','/duneprotect worldedit opens the native WorldEdit command entry point. Native WorldEdit tool commands remain available and retain their own permissions.']},
|
||
{id:'worldguard',title:'WorldGuard',module:'DuneProtect / WorldGuard',status:'Available',nodes:['duneprotect.regions'],steps:['Identify the region and its owners, members and flags before making changes.','Check protections with a normal player account after changing a lobby or portal region.'],checks:['Avoid removing global protection to fix a single portal.','/duneprotect worldguard forwards to the native region command. Both duneprotect.regions and the relevant WorldGuard permission are required.']},
|
||
{id:'chat',title:'Chat',module:'DuneEss',status:'Integration pending',nodes:['duneess.chat.network','duneess.chat.nearby','duneess.chat.team','duneess.chat.faction','duneess.chat.imperial','duneess.chat.colors','duneess.chat.format'],steps:['Local and Proxy refer to the same network channel. Nearby is a separate channel with a 50-block range.','Team and house channels restrict their recipients. Imperial chat is intended for the emperor, house leaders, guild staff and political appointments.'],checks:['Use test accounts to verify the intended recipients when changing channel permissions.','Moderation must apply to channel commands as well as ordinary chat.']},
|
||
{id:'moderation',title:'Bans, kicks & moderation',module:'DuneBan / DuneCore',status:'Available',nodes:['dune.ban.local','dune.ban.global','dune.unban.local','dune.unban.global','dune.moderation.ban','dune.moderation.unban'],steps:['Check the player UUID and relevant ticket before acting. Review their history.','Choose the intended scope: one server or the whole network. Add a clear reason and check any duration before confirming.'],checks:['Use /duneban local <player> <reason> or /duneban global <player> <reason>, with the matching dune.ban scope permission. Use the administration GUI when reviewing a target interactively.','Never use a real player as a test ban. A local ban and a network ban are separate actions.']},
|
||
{id:'inventory',title:'Inventory & custom items',module:'DuneCore',status:'Player inventory view available; staff editor pending',nodes:['web.menu.inventory','web.menu.items','web.items.manage','dune.items.give'],steps:['Use Inventory to view the projection for your verified Minecraft UUID. Shop, Kits Exchange and Exchange history have their own navigation.','The staff inventory editor and custom item designer are planned as separate tools.'],checks:['Do not edit a player inventory owned by another active server session.','Custom item definitions must not mint currency or execute arbitrary commands.']},
|
||
{id:'economy',title:'Economy & shops',module:'DuneEss',status:'Existing economy available; staff GUI pending',nodes:['duneess.exchange','duneess.shops.use','web.community.manage'],steps:['Use the exchange and configured shops for ordinary transactions.','Record the reason and target UUID when correcting an economic issue. The requested staff GUI is still being integrated.'],checks:['DuneEss owns economic changes; inventory tools must not bypass its ledger.','Player overhead balances are intended to show Dunemarks. Ordinary players’ carried spice and water remain private; smuggler cargo is public. The new labels are not deployed yet.']},
|
||
{id:'tickets',title:'Tickets & case handling',module:'DuneCore / website support',status:'In-game ticket cards and canonical staff desk available',nodes:['dune.tickets.view','dune.tickets.staff'],steps:['The website support system is the canonical ticket record. In-game tickets must use the same record and conversation.','The requested workflow is: take the ticket, resolve any suspect to a UUID, and carry that context into the appropriate staff menu.','Teleport actions belong in the teleport menu; suspect inventory actions belong in the inventory menu.'],checks:['The in-game menu loads current bounded ticket metadata for the actual verified Minecraft UUID. Open the canonical osTicket staff desk for assignment and replies; current website department permissions still apply.','Teleporting to a ticket creator must require an assigned ticket, permission and an online target.']},
|
||
{id:'travel',title:'Guild travel & lobby',module:'DuneEss / DuneLobby',status:'Existing travel available; token integration pending',nodes:['duneess.travel','duneess.tokens.buy','dunelobby.visit','dunelobby.build','dunelobby.admin'],steps:['Use the guild travel interface to choose an available destination.','The requested one-use token system will be managed by DuneEss; lobby portals will delegate to it.'],checks:['The commissioned destinations are Arrakis, Kaitain, Giedi Prime and the Spacing Guild lobby. Backend IDs remain original; public house and world names use the site lore.','Travel validates the commissioned route and successful fare withdrawal before requesting transfer. Do not add uncommissioned destinations to the selector.']},
|
||
{id:'quests',title:'NPCs & quests',module:'DuneNPC / DuneQuests / DuneAtelier',status:'Available',nodes:['dune.quests.view','dune.quests.admin','dune.atelier.view','dune.atelier.redeem'],steps:['DuneNPC owns NPC interactions and the quest entry point.','Quest payments and shop actions use authoritative shared wallets and unique receipts; do not substitute arbitrary grant commands.'],checks:['Use /dunequests for discoveries and /duneatelier for The Loom of the Desert, paid kit deliveries and sales rewards. Hidden definitions remain private; sales rewards transfer existing server-bank funds.']},
|
||
{id:'politics',title:'Houses & political appointments',module:'DuneCore / DuneEss',status:'Existing politics available; staff GUI pending',nodes:['dune.admin'],steps:['Keep house membership separate from a player’s access rank.','Political appointments must follow their current term and be removed when they expire.'],checks:['Office regalia uses the current elected UUID and exact term; losing office removes outfit access. Cosmetic designs must be saved before the one claim for that term.','Managed house and political memberships follow game authority; manual access ranks do not make a player an elected officeholder.']},
|
||
{id:'servers',title:'Server operations',module:'Account control panel',status:'Available',nodes:['web.menu.servers','web.servers.view','web.servers.logs','web.servers.power','web.servers.console'],steps:['Open Servers and check status before issuing an action.','Read the relevant logs when investigating a startup failure. Use console commands only when needed.','Check status again after a start, stop or restart.'],checks:['Proxy, lobby, Arrakis, Kaitain and Giedi Prime are commissioned. Planet backends use the new game host and central per-function MySQL databases.','The requested planet regenerations are complete and archived. Preserve the Spacing Guild lobby and do not regenerate worlds as routine maintenance.']}
|
||
];
|
||
|
||
export function createStaffManual(db){return async request=>{
|
||
const user=await identity(request,db);
|
||
if(!user)return json({message:'Sign in first.'},401);
|
||
if(!await can(db,user,'web.menu.staffmanual'))return json({message:'Permission required: web.menu.staffmanual'},403);
|
||
if(request.method!=='GET')return json({message:'Method not allowed'},405);
|
||
return json({title:'Staff manual',categories:STAFF_MANUAL});
|
||
};}
|

Staff