Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Test that READ_ONLY=true blocks every write

Closed Beginner friendly
#4 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, node.js
Domain
backend, testing

Research direction

Read the CONFIG.readOnly and authenticate() logic in server/server.js, then follow the existing server setup in tests/api.test.mjs. Start a second server on another port with its own data folder and READ_ONLY: 'true'. Add checks for the two reads and both 403 write responses, then stop the server and remove its data folder; done when npm test passes.

Written by the indexing model from the issue text.

Description

good first issue help wanted
The task

READ_ONLY=true freezes the map for everyone: every account, admins included, is treated as a viewer. It is documented in the README and used in practice to freeze a map during an audit, but no test checks it. Add one, so that a future change cannot silently make a read-only server writable again.

Where to look
  • server/server.js: CONFIG.readOnly, and authenticate() (around line 254), which downgrades every role to viewer
  • tests/api.test.mjs: the existing tests start one server in before(). A read-only server needs its own: start a second one on another port and data folder, with READ_ONLY: 'true', the same way before() does
Done when
  • With READ_ONLY=true, an admin can still read (GET /api/state, GET /api/me says readOnly: true)
  • The same admin gets 403 on a write (PUT /api/si/...) and on POST /api/rollback
  • The second server is stopped and its data folder removed at the end of the test
  • npm test passes
Mentor

@0b3l1X-SolidGeeks

Dominant language
JavaScript
Stars
0
Forks
1
Avg merge
14m
Merged PRs (30d)
31

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SolidGeeks/strata

All issues in SolidGeeks/strata

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.