Skip to content

Watchface page: a "more" menu with Unpublish and Delete for the owner and moderators - #113

Merged
freethinkel merged 2 commits into
mainfrom
moderator-delete
Nov 21, 2026
Merged

freethinkel merged 2 commits into
mainfrom
moderator-delete

Conversation

@freethinkel

Copy link
Copy Markdown
Collaborator

A moderator (the users.moderator flag, set by a superuser in the PocketBase admin UI) can now take down anyone's watchface from its showcase page.

  • $canModerate (market model): the owner or a moderator. It's the same test the backend's watchfaces rules use, so the menu never offers what the server would refuse.
  • The showcase page's top bar gets a "⋯" menu with Unpublish (only when published) and Delete (with a confirm). Either one from that page reloads the market and goes back to /, since a moderator can't even view an unpublished face. The menu is meant to collect the face's further actions.

Backend: fmc_pocketbase migration 1755200000_moderator_faces.js. A moderator may delete any face, and their only update is published: false with no other field. Already deployed, and checked against a local PocketBase 0.39.8: owner, moderator and stranger, each allowed and refused case.

tests/editor-rotate.browser.test.ts fails on main as well. It's unrelated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CQSU8QaiMzNR2mxbb6VVG9

freethinkel and others added 2 commits November 21, 2026 14:43
$canRemove mirrors the watchfaces deleteRule (owner, or users.moderator), so the menu
never offers what the server refuses. Deleting from the showcase page goes back to /.
The menu is the place for the face's further actions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8QaiMzNR2mxbb6VVG9
Owner and moderators can take a published face off the market; unpublishing from the
showcase page reloads the market and goes back to /, as a delete does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQSU8QaiMzNR2mxbb6VVG9
@freethinkel
freethinkel merged commit 76f608a into main Nov 21, 2026
1 check passed
@freethinkel
freethinkel deleted the moderator-delete branch November 21, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant