mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 09:37:50 -05:00
feat(modpanel): the mod log as its own page
The admin panel's "What they did" table, in the moderator panel too: the latest 300 entries. A new permission, staff.log, which moderators and admins have by default, guards the page and its route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
0f367c55b8
commit
8368692b99
3 files changed
+38
-1
No files matched your search
@@ -670,6 +670,17 @@ const handle = async (req, res, url, from, web) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// the mod log (lib/modlog.js): what staff did, as the admin panel's
|
||||
// Moderators page shows it.
|
||||
if (route === "GET /mod/api/modlog") {
|
||||
if (!roles.can(mod, "staff.log")) {
|
||||
reply(403, {error: "Your role does not allow that."});
|
||||
return;
|
||||
}
|
||||
reply(200, {log: modlog.recent()});
|
||||
return;
|
||||
}
|
||||
|
||||
// everything else shows players and what they did: not for a role that
|
||||
// only makes things.
|
||||
if (!roles.can(mod, "player.view")) {
|
||||
|
||||
Reference in new issue
Block a user