-
Notifications
You must be signed in to change notification settings - Fork 7
APERTA-12923 change decision attachment view delegation #4077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APERTA-12923 change decision attachment view delegation #4077
Conversation
| end | ||
|
|
||
| delegate_view_permission_to :decision | ||
| delegate_view_permission_to :revise_task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure when the revise task springs into existence, do you all know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the paper is sent back to the author.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so maybe it should be
def revise_task_or_decision
revise_task || decision
end
delegate_view_permission_to :revise_task_or_decisionbut then i feel like i'm overloading our system? or is this fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decisions are not first class objects for use in the roles and permissions system. That is, it never makes sense to check can? :view, decision.
I think checking if the user can view the revise task makes sense, if that is where they upload decision attachments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is more than just decision attachments...
How about cover letter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan on reviewing attachment permissions per role for:
Response to reviewers
Cover Letter
Reporting Guidelines
Reviewer report
Invite reviewers
invite academic editor
upload manuscript
reporting guidelines
Figures and
Supporting Info
|
This looks correct to me, but I haven't tested it. |
|
Can you both test this? Before pushing further? |
|
Confirmed that this works on https://plos-ciagent-pr-4077.herokuapp.com/papers/yetijour.1000011 Logged in as an invited reviewer, I can download the attachment uploaded to the "Response to Reviewers" task. |
|
Also confirmed that an admin user can replace and delete the attachment. |
JIRA issue: https://jira.plos.org/jira/browse/APERTA-12923
What this PR does:
Just a little fine tuning of our new awesome permissions system :D
Special instructions for Review or PO:
As a reviewer you should now see the links to uploaded files. This may also fix https://jira.plos.org/jira/browse/APERTA-12923?focusedCommentId=214306&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-214306 though i'm still mostly adhering to the AC here
Code Review Tasks:
Author tasks (delete tasks that don't apply to your PR, this list should be finished before code review):
## [Unreleased]in CHANGELOG.mdReviewer tasks (these should be checked or somehow noted before passing on to PO):