Skip to content

[BE-172] Dispute filing has no check that the filer owns the document #1137

Description

@mftee

Overview

BE-90/BE-54 built dispute-filing endpoints, but backend/src/dispute/dispute.controller.ts doesn't appear to verify the requester is the document's owner (or an admin) before allowing a dispute to be filed against it — any authenticated user could file a dispute on someone else's document.

Tasks

  • Add an ownership/admin check in DisputeController's create endpoint
  • Add a test asserting a non-owner, non-admin user gets 403 when filing a dispute on another user's document

Acceptance Criteria

  • Filing a dispute on a document you don't own and aren't an admin for returns 403

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendbugSomething isn't workingnestjs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions