Skip to content

Check author when showing scope notes and votes#1551

Merged
arfon merged 1 commit into
mainfrom
editor-authorship-check
Jun 13, 2026
Merged

Check author when showing scope notes and votes#1551
arfon merged 1 commit into
mainfrom
editor-authorship-check

Conversation

@arfon

@arfon arfon commented Jun 12, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new method to the Paper model to check if a given user is the submitting author and updates the UI to restrict editors from seeing certain sections for their own submissions. It also adds tests to ensure the new method works as expected.

Model changes:

  • Added the submitted_by?(user) method to the Paper model to determine if a given user is the submitting author.

UI changes:

  • Updated the unpublished paper view (_show_unpublished.html.erb) so that editors do not see the "vote summary" and "notes" sections for papers they themselves submitted.

Testing:

  • Added tests for the submitted_by? method in paper_spec.rb to verify correct behavior for the submitting author, other users, and nil cases.

Fixes #1550

@sneakers-the-rat sneakers-the-rat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this hides the panels on the deployed preview!

@arfon arfon merged commit 9c738b3 into main Jun 13, 2026
2 checks passed
@arfon arfon deleted the editor-authorship-check branch June 13, 2026 09:02
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.

Hide editor panels in paper view from editors who are the ones who made the submission

2 participants