Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/decision_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def decision
owner
end

delegate_view_permission_to :decision
delegate_view_permission_to :revise_task
Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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_decision

but then i feel like i'm overloading our system? or is this fine?

Copy link
Contributor

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.

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?

Copy link
Collaborator

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


protected

Expand Down