Skip to content

Submit yields for review, and the Review page #128

Description

@paccloud

What to build

This slice covers the whole review loop for submitted yields, following CONTEXT.md and ADRs 0001 and 0004 in #122.

Submitting. A signed-in, non-anonymous owner submits a custom yield from My data. The submit dialog asks for an optional display name and states that approval releases the yield under CC BY 4.0, attributed only by display name or "Anonymous". A yield whose starting form is blank cannot be submitted.

Reviewing. A reviewer, meaning an account that has been granted the right (being signed in is not enough), sees pending submissions on the Review page. The reviewer can approve, or reject with an optional review note that only the owner sees.

  • Approving copies the yield into a separate public collection holding only the public fields: species, conversion, yield and display name. The same batch marks the private record approved. The free-text source note stays private.
  • Rejecting returns the yield to private, with the note visible to its owner.
  • Changing the display name rewrites the name on all of that owner's public copies in one batch; clearing it sets them to "Anonymous".
  • Editing or deleting an approved yield deletes its public copy in the same batch. After an edit, the yield is submitted again.

Acceptance criteria

  • The submit dialog captures an optional display name and the CC BY 4.0 consent; a blank display name shows as "Anonymous"
  • Anonymous users and yields with a blank starting form cannot submit
  • The reviewer right is granted outside the app (a custom claim or an allowlist in the rules) and is documented
  • The Review page lists pending submissions for reviewers only
  • Approve writes the public copy and the approved status in one batch
  • Reject returns the yield to private, with an optional note that only the owner can read
  • Changing or clearing the display name updates every one of the owner's public copies in one batch, and the rules let an owner change only the name on their own public copies
  • Editing or deleting an approved yield removes its public copy in the same batch, and an edit resubmits it
  • The public collection holds only species, conversion, yield and display name; rules tests prove it never contains the owner's user id, the source note, the submission details or the review note
  • Rules tests prove that only reviewers can approve or reject, and only owners can remove their own public copy

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions