feat(roles): masterpieces.approve, its own permission

Approving and removing framed paintings was items.approve, which also
judges the items and pictures players make. masterpieces.approve now
guards it, on the server (POST /mod/api/masterpiece) and in the mod
panel's buttons and its "only ones I approved" filter. Moderators and
admins have it by default; seeing the Masterpieces page is still
player.view.

roles.load, once at start (setting permissionSplitMasterpieces): a role
list the admin changed, and a staff member's own grants and denies, that
held items.approve are given masterpieces.approve too, so nobody gains or
loses anything by the split.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
BurrowdevandClaude Opus 5.5 committed 2026-10-21 20:50:44 +03:00
1 parent 9720d309fa
commit 9efb2558fc
4 files changed
+41 -8

No files matched your search

+3 -3
View File
@@ -896,10 +896,10 @@ const handle = async (req, res, url, from, web) => {
return;
}
// a painting judged: for the roles that judge what players make, and
// never their own or one by staff of their rank or above.
// a painting judged: for the roles that judge paintings, and never
// their own or one by staff of their rank or above.
case "POST /mod/api/masterpiece": {
if (!may("items.approve")) {
if (!may("masterpieces.approve")) {
return;
}
const id = String(body.id || "");