You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): DSAR policy says any admin can cancel a staged weakening, but the server lets only the owner #4835
The data-subject-request policy tells admins they can stop a staged weakening, but the server lets only the owner do it. Paths at mainacd5dbd10.
What the UI says (services/platform/messages/en/governance.yml):
dsarPolicy.ownerOnlyNotice: "… the change is staged for 24 hours so any admin can revert it."
dsarPolicy.loosenProposedDescription: "Weakening changes apply after a 24-hour grace window. Any admin can cancel before then."
dsarPolicy.pendingBanner.description: "Proposed by {name}. Any admin can cancel before this takes effect."
The banner enables Cancel for every admin (app/features/settings/governance/components/dsar-policy-editor.tsx:242-247).
What the server does:POST /dsar/policy/cancel-pending answers a non-owner with 403 { error: 'FORBIDDEN', message: 'Owner role required' } (backend/domains/governance/routes.ts:677-683).
What an admin sees: the editor's catch (dsar-policy-editor.tsx:184-189) shows only the generic toast title "Couldn't save changes", with no description and no next step. The weakening (a shorter cooling-off, dual approval off, a higher daily limit) then takes effect, although the copy promised that any admin could stop it.
Either the safeguard or the copy is wrong. The 24-hour staging exists so that another admin can veto a weakening, which suggests the server check is too strict.
Expected
Decide who may cancel. Then:
if any admin, relax the route check to admin;
if the owner only, change the three strings in en/de/fr, show Cancel only to the owner, and map the 403 to a sentence naming the owner.
Regression: a route test for an admin's cancel (allowed, or refused with the documented code) plus an editor test that the banner's copy and Cancel match that rule.
Severity and owner
Severity: medium. A governance safeguard behaves differently from its description at the moment it matters.
Owner: platform (governance, data subject requests). The policy decision belongs to the owner of the DSAR safeguards.
Found by: Review A (TALE-358), 2026-10-12 08:15 Zurich occurrence, oldest-due governance.data-subject-requests slice. Static reading at acd5dbd10; nothing was run, because Review A's stack is BLOCKED.
Addendum (Review A, TALE-358, 2026-10-13 00:15 Zurich occurrence): the same pending-weakening banner also shows raw values. maindf7cd70f7, services/platform/app/features/settings/governance/components/dsar-policy-editor.tsx.
Booleans and numbers are printed raw. The banner builds its diff with String(current.requireDualApproval) → String(pending.config.requireDualApproval) (:370-376, the same for the other two settings) and renders {d.from} → {d.to} (:414). An admin reads "Require dual approval: true → false" with English true/false in every locale, instead of "On → Off", and the cooling-off hours have no unit.
The proposer shows as a raw id.pendingBanner.description gets name: pending.proposedByEmail ? \${email} (${proposedBy})` : pending.proposedBy (:397-400`), so it reads "Proposed by [email protected] (usr_…)", or just the internal user id when the email is unknown.
Expected: render the booleans with the editor's own On/Off labels and the hours with their unit, and name the proposer by display name or email, never by id. Fold this into the fix for the banner's cancel sentence above.
This is static reading, verified at the cited lines. I didn't run it.
Decision: any admin may cancel a staged weakening of the data-subject-request policy. The server's owner-only check is the bug; the copy that promises it stays.
The question. Who may cancel a staged weakening of the DSAR policy (a shorter cooling-off, dual approval off, a higher daily limit): any admin, or only the owner? (TALE-172, tale#4835)
Options weighed
Any admin.POST /dsar/policy/cancel-pending takes the same admin check that GET /dsar/policy already uses. The cost: an admin can stop each weakening the owner proposes. The owner can see who did it in the audit log and, if needed, remove that admin. A cancel can only keep the stronger safeguards in force.
Owner only. The four en/de/fr sentences change, Cancel shows only to the owner, and the 403 becomes a sentence. The cost: only the person who proposed a weakening could stop it, so the 24-hour stage would protect against nothing. A compromised or mistaken owner account could switch off dual approval or shorten the cooling-off, and no one could stop it.
Decided: any admin. The reasons, checked at tale-project/talemaindf6105cef08a78084439c029d5917611c4adcf54:
The safety of data subjects comes first. The stage exists so that another admin can veto, and the editor says so: "staged for 24 hours so any admin can revert it" (services/platform/messages/en/governance.yml:1700-1703, also :1706-1707 and :1712). Proposing stays owner-only (services/platform/backend/domains/governance/routes.ts:650-655). Only the veto widens, and only in the safe direction.
It matches Tale's other staged acts. Any admin can cancel an erasure request in its cooling-off (governance.yml:1505-1507), and releasing a legal hold needs a different admin. The owner-only check at routes.ts:687-693 is the outlier.
It is already recorded. A cancel writes the audit row policy.dsar_governance_loosening_cancelled with the actor (services/platform/backend/domains/governance/settings-tail.ts:717-746).
Done means
POST /dsar/policy/cancel-pending accepts the owner and admins, using the isAdmin check of routes.ts:641, and still refuses a member with 403. The audit row names the admin who cancelled.
The addendum on tale#4835 (2026-10-12) is part of this change, as it asks:
the pending banner shows the editor's On/Off labels and the hours with their unit instead of raw true/false (services/platform/app/features/settings/governance/components/dsar-policy-editor.tsx:366-381, :414);
it names the proposer by display name or email, never by user id (:397-400).
Tests:
route tests: an admin's cancel returns 200 and writes the audit row with that admin as actor; the owner's cancel still works; a member gets 403;
an editor test: an admin sees the banner's Cancel, and the banner renders On/Off, the hours unit and the proposer's name.
Choices left to the Coder:
whether the delete and its audit row move into one transaction (today the DELETE runs before sql.begin);
the sentence a failed cancel shows instead of the bare "Couldn't save changes" (dsar-policy-editor.tsx:184-189). One case to cover is NO_PENDING_CHANGE: another admin cancelled first, or the change has taken effect.
The squash message ends with Closes #4835.
Line: stable
Priority p2: the issue gives severity medium and has no priority: label. No issues filed.
What would change this decision: a person responsible for the DSAR safeguards answering that a legal or contractual duty requires the owner alone to decide. The owner-only option would then apply as the issue describes it.
How this task lands now: branch from origin/<the train of its line>
(train or feature-train) and record that commit as the base; open no pull
request, and close one the task still has. Hand over on this task (train,
branch, full head, base, the gate you ran, and the squash message ending with Closes #<n> or Refs #<n>), then move it to In review. The Lead's decision
above settles what the task asked a person; a technical choice is yours to make
and record in the plan (Development's "Who decides"). This replaces whatever an
older copy of the instructions earlier in this task's conversation says.
Activity
yannickmonney commentedon Oct 12, 2026
Addendum (Review A, TALE-358, 2026-10-13 00:15 Zurich occurrence): the same pending-weakening banner also shows raw values.
maindf7cd70f7,services/platform/app/features/settings/governance/components/dsar-policy-editor.tsx.String(current.requireDualApproval)→String(pending.config.requireDualApproval)(:370-376, the same for the other two settings) and renders{d.from} → {d.to}(:414). An admin reads "Require dual approval: true → false" with Englishtrue/falsein every locale, instead of "On → Off", and the cooling-off hours have no unit.pendingBanner.descriptiongetsname: pending.proposedByEmail ? \${email} (${proposedBy})` : pending.proposedBy(:397-400`), so it reads "Proposed by [email protected] (usr_…)", or just the internal user id when the email is unknown.Expected: render the booleans with the editor's own On/Off labels and the hours with their unit, and name the proposer by display name or email, never by id. Fold this into the fix for the banner's cancel sentence above.
This is static reading, verified at the cited lines. I didn't run it.
tale-review-bot commentedon Oct 31, 2026
Decision: any admin may cancel a staged weakening of the data-subject-request policy. The server's owner-only check is the bug; the copy that promises it stays.
The question. Who may cancel a staged weakening of the DSAR policy (a shorter cooling-off, dual approval off, a higher daily limit): any admin, or only the owner? (TALE-172, tale#4835)
Options weighed
POST /dsar/policy/cancel-pendingtakes the same admin check thatGET /dsar/policyalready uses. The cost: an admin can stop each weakening the owner proposes. The owner can see who did it in the audit log and, if needed, remove that admin. A cancel can only keep the stronger safeguards in force.Decided: any admin. The reasons, checked at
tale-project/talemaindf6105cef08a78084439c029d5917611c4adcf54:services/platform/messages/en/governance.yml:1700-1703, also:1706-1707and:1712). Proposing stays owner-only (services/platform/backend/domains/governance/routes.ts:650-655). Only the veto widens, and only in the safe direction.governance.yml:1505-1507), and releasing a legal hold needs a different admin. The owner-only check atroutes.ts:687-693is the outlier.policy.dsar_governance_loosening_cancelledwith the actor (services/platform/backend/domains/governance/settings-tail.ts:717-746).Done means
POST /dsar/policy/cancel-pendingaccepts the owner and admins, using theisAdmincheck ofroutes.ts:641, and still refuses a member with 403. The audit row names the admin who cancelled.true/false(services/platform/app/features/settings/governance/components/dsar-policy-editor.tsx:366-381,:414);:397-400).DELETEruns beforesql.begin);dsar-policy-editor.tsx:184-189). One case to cover isNO_PENDING_CHANGE: another admin cancelled first, or the change has taken effect.Closes #4835.Line: stable
Priority p2: the issue gives severity medium and has no
priority:label. No issues filed.What would change this decision: a person responsible for the DSAR safeguards answering that a legal or contractual duty requires the owner alone to decide. The owner-only option would then apply as the issue describes it.
fix(platform): let any admin cancel a staged DSAR policy weakening
docs: amend the v0.5.95 release notes
docs: amend the v0.5.95 release notes