Skip to content

Scope single-QSO QSL updates to the owning user - #3478

Merged
magicbug merged 1 commit into
devfrom
fix/scope-single-qso-qsl-to-owner
Oct 14, 2026
Merged

magicbug merged 1 commit into
devfrom
fix/scope-single-qso-qsl-to-owner

Conversation

@magicbug

Copy link
Copy Markdown
Owner

Problem

PR #3477 scoped bulk QSL writes in Logbookadvanced_model to the requesting user's station profiles. The same primary-key-only gap remains on single-QSO paths: Qso::qsl_rcvd_ajax(), Qso::qsl_sent_ajax(), and Logbook_model::qsl_rcvd() (plus paperqsl_update / paperqsl_update_sent used by the ajax handlers).

Thanks to raufaser for spotting this while reviewing #3477.

Fix

  • Add Logbook_model::scopeQsosToUser() (same SQL pattern as Scope bulk QSO updates to the owning user #3477).
  • Apply it in paperqsl_update(), paperqsl_update_sent(), and qsl_rcvd() so updates only match QSOs whose station_id belongs to the session user (owner-only; shared-logbook writes unchanged from the bulk fix scope).
  • qsl_rcvd_ajax and qsl_sent_ajax now return { "message": "Error" } when no owned row is updated (existing client failure shape).

Testing

  • php -l on changed files (see CI / local PHP if unavailable in agent environment).
Open in Web Open in Cursor 

Apply owner-only station_id scoping (matching Logbookadvanced_model
bulk fix in #3477) to paperqsl_update, paperqsl_update_sent, and
qsl_rcvd(). Return Error from qsl_rcvd_ajax and qsl_sent_ajax when
no owned QSO matches.

Spotted by raufaser in #3477.

Co-authored-by: Peter Goodhall <magicbug@users.noreply.github.com>
@magicbug
magicbug marked this pull request as ready for review October 14, 2026 10:42
@magicbug
magicbug merged commit ab08c74 into dev Oct 14, 2026
1 check failed
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.

2 participants