Repository navigation
feat: org-verify-write and org-verify-remove actions for fleet verification - #165
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 4 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mortik
force-pushed
the
feat/org-verification
branch
from
October 7, 2026 15:31
ea53912 to
71de011
Compare
3 tasks done
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets fleetyards.net verify a fleet's RSI organisation for its manager. Part of fleetyards/fleetyards#5465; the same idea as the handle verification in #155, for the org page.
What changed
org-verify-write({sid, token}) appends aFLEETYARDS-…token to the org's history, after a blank line, and publishes the draft. If the token is already there, it answerschanged: falseand writes nothing.org-verify-removeremoves exactly that appended\n\n<token>and publishes again.actions.Safeguards
<textarea name="history">on/orgs/<SID>/admin/content, so the org's Textile formatting goes back exactly as it was. Nothing is ever built from the formatted public page.403.publishDraftpublishes the org's whole draft, so the action first compares the draft preview (/admin/preview) with the public page, both reduced to plain text with everyFLEETYARDS-token removed. Any difference means another officer has unpublished edits, and it answers409without writing. Pages it can't read answer422.^FLEETYARDS-[A-Z0-9]{10}$and an SID matching^[A-Z0-9]{1,10}$are accepted.200withsuccess: 0) answers502, and nothing is published after it.Requests (captured from an officer session):
POST /api/orgs/saveDraft {symbol, history},POST /api/orgs/publishDraft {symbol}, both withX-Rsi-TokenandX-Requested-With.Test plan
pnpm test(71): draft reading, access denied, block comparison, and each answer of both actionspnpm compile,pnpm build422rather than writing.🤖