Skip to content

docs: clarify OCAP_AUTH_ADMINSTEAMIDS takes no brackets in env var#460

Merged
fank merged 1 commit into
mainfrom
docs/admin-steamids-env-format
May 30, 2026
Merged

docs: clarify OCAP_AUTH_ADMINSTEAMIDS takes no brackets in env var#460
fank merged 1 commit into
mainfrom
docs/admin-steamids-env-format

Conversation

@fank
Copy link
Copy Markdown
Member

@fank fank commented May 30, 2026

Why

A user set OCAP_AUTH_ADMINSTEAMIDS=[id1,id2] (JSON-array brackets) and was silently never recognized as admin. Since the viper #761 BindEnv workaround was removed, viper resolves the env var into the []string field by splitting on commas only — it does not strip brackets. So [id1,id2] parses as ["[id1", "id2]"] and slices.Contains never matches the real Steam ID. Removing the brackets (id1,id2) works.

What

Documentation-only clarification (no behavior change):

  • README.md — admin Steam IDs table cell now reads "comma-separated, no brackets, in env var".
  • egg-ocap2-web.json / egg-ocap2-web-pterodactyl.json — the "Allowed Steam IDs" field description gains an inline example 76561198012345678,76561198087654321 (no brackets, no quotes), since the Pelican/Pterodactyl config UI is where the reporting user was.

The bracketed ["..."] form remains correct for setting.json (JSON array).

Setting the admin Steam IDs env var with JSON-array brackets
(e.g. [id1,id2]) silently fails: viper splits the value on commas
only and the brackets become part of the IDs, so the admin check
never matches. Note the bracket-less comma-separated format in the
README table and in both Pelican/Pterodactyl egg field descriptions.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the documentation in README.md and the configuration descriptions in egg-ocap2-web-pterodactyl.json and egg-ocap2-web.json to clarify that the OCAP_AUTH_ADMINSTEAMIDS environment variable expects a comma-separated list of Steam64 IDs without brackets or quotes. There are no review comments, and I have no feedback to provide.

@fank fank merged commit 4558ca7 into main May 30, 2026
1 check passed
@fank fank deleted the docs/admin-steamids-env-format branch May 30, 2026 15:32
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