Skip to content

feat(main): add Administrator UI Enabled setting - #134

Open
jonpas wants to merge 1 commit into
OCAP2:mainfrom
jonpas:admin-ui-setting
Open

jonpas wants to merge 1 commit into
OCAP2:mainfrom
jonpas:admin-ui-setting

Conversation

@jonpas

@jonpas jonpas commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Adds an Administrator UI Enabled CBA setting (OCAP_enabledAdministratorUI, Core, default on). It turns the Administrator UI entry in the briefing diary on or off. Off is useful for communities with their own recording controls (an AAR framework, a persistence system), which would otherwise hide the entry by script.

This was merged once as #30, but into feature/cba_rework, which never reached main, so v2.1.0 doesn't have it.

  • Off: OCAP_recorder_fnc_adminUIControl gives nobody the entry, and removes it from anyone who has it.
  • Changed during the mission: the setting's change handler runs adminUIControl for every player on the server, so turning it on or off applies at once. That handles the limitation Add Enabled Administrator UI setting #30 mentioned.
  • On (the default): nothing changes.

hemtt check passes with no new notes. Not tried in a mission yet.

🤖 Generated with Claude Code

Turns the Administrator UI diary entry on or off, for communities with their own recording
controls. Off, nobody gets the entry and anyone who has it loses it; a change during the mission
applies to every player at once.

Previously merged as OCAP2#30 into feature/cba_rework, which never reached main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fank

fank commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Ratatoskr reviewed this pull request.

Changes requested on 834e565c. See the review.

Finished 2026-11-30 22:00 UTC.

@fank fank left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

REQUEST_CHANGES — 1 blocking finding.

Review details

Reviewed head 834e565cb4129988d06022cad1fcc2eb91aedcc3.

[P2] Separate UI visibility from recording-command authorization

addons/recorder/fnc_adminUIcontrol.sqf:102–106: disabling the setting removes controls and clears OCAP_hasAdminControls; joining with it disabled exits before that flag can be granted. However, OCAP_recorder_isAuthorizedEventCaller uses that same flag to authorize remote callers (fnc_addEventMission.sqf:162–165). Consequently, even an administrator or allowlisted player using a community's replacement client UI to send OCAP_record, OCAP_pause, OCAP_exportData, or either focus event through CBA_fnc_serverEvent is rejected once this UI setting is off. Server-local mission scripts remain unaffected.

Please decouple diary visibility from authorization, preserving the existing server-owned admin/allowlist permission checks independently of this setting. Add a regression covering an authorized remote caller with the diary disabled, plus rejection of an unauthorized caller and live off/on transitions.

Verification and limitations

  • git diff --check: passed; checkout remains unchanged.
  • GitHub build 46520068890 succeeded for the exact reviewed head, including hemtt check and hemtt build. Logs include lint notices and an Arma 3 Tools warning.
  • Local HEMTT and Arma executables were not available on PATH; no local build or in-game tests were run. Dedicated/listen-server UI behavior, JIP, and live toggling remain runtime-unverified. The finding above is a source-traced authorization regression, not a claimed in-game reproduction.
  • No regression tests were changed; existing tests contain no references to the new setting or the shared authorization flag/helper.
  • GitHub GraphQL review-thread enumeration returned no threads (hasNextPage: false), so there were no earlier discussions to resolve, keep open, or skip. Authenticated reviewer: fank.

@YetheSamartaka

Copy link
Copy Markdown
Contributor

Please resolve the review feedback @jonpas

@jonpas

jonpas commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Why is it necessary to force-push and make pulling a hassle instead of a simple git pull? 🙃

@YetheSamartaka

Copy link
Copy Markdown
Contributor

@jonpas sorry, I used the GitHub button for rebase

This branch has not been deployed

No deployments
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.

3 participants