Shared-record leaks: archive, delete dialog, employer structure, merge preview (A1) #993
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!993
Loading…
Reference in a new issue
No description provided.
Delete branch "sec2-a1-shared-leaks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes five findings of the 2026-10-16 security review that concern what a shared or group-owned record shows to people it is shared with. Part A1 of the SEC2 series.
What and why
appointmentsprefetch is nowAppointment.objects.for_user(user), as the other children are, sobuild_documentcarries only the exporter's own meetings, andcounts()["appointments"]equals what the file holds.**mine, like the career rows beside it.CompanyDeleteViewandPostingDeleteViewcount only the reader's own applications, appointments, history entries, captures, career rows, references and sent documents (postings and the contacts the reader can see stay record-level), and say without a number that what other people keep stays with them as a copy. The company and listing detail pages computedeletions.facts_forand draw the Delete and Merge buttons and the dialog only whensharing.manages.parent_of,children_of,group_of,in_a_groupandcompanies_countedanswer for the reader (visible companies only), the companies table's Part of column checks that the parent is visible, andCompanyFormrefuses a parent whose audience could not see the company, on create as well as on edit (sharing.check_child_link).Tests
tests/security/test_shared_leaks.py: theworldfixture gained an owner's appointment with a secret note, added toSECRETS, so every surface test covers it; new tests for the archive (shared case and two members of a group, with the count), the merge plan, the delete dialog for a read-only reader and for a manager of a group's record, and both cases of the parent/child leak. They fail without the fix (7 of the 14 in that file). Full unit suite: 18,871 tests, green apart from catalogue-compiling tests that needmessages.py compilein a fresh worktree (which passed once compiled).test_unscoped_queriescaught that one baseline line was fixed, and it is removed.Notes
gdpr.referencesanderase_contactcounts are left to A2 (#956, #961), which editscore/gdpr.pyand the contact views.company_detail.html,posting_detail.html,company_row.html): the owner still sees every button, so the CI browser job should be read for the company and listing pages.Closes #966, Closes #957, Closes #958, Closes #973, Closes #955
🤖 Generated with Claude Code