Skip to content

Commit 42e032c

Browse files
committed
revert the revert crocodoc permissions change
This reverts the revert for CNVS-26051 as the data migration has completed. fixes CNVS-26154 test plan: * enable canvadocs (or crocodoc) * submit an assignment and annotate it as the teacher and student * re-submit the assignment * the student should still be able to view the *prior* submission's annotations Change-Id: Id8dd00b1afffd0858e70ed315c2ebe00fe99201c Reviewed-on: https://gerrit.instructure.com/69537 Reviewed-by: Cameron Matheson <cameron@instructure.com> Tested-by: Jenkins QA-Review: Jason Carter <jcarter@instructure.com> Product-Review: Keith T. Garner <kgarner@instructure.com>
1 parent 9987774 commit 42e032c

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

app/models/crocodoc_document.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ def permissions_for_user(user, whitelist = nil)
9696
opts[:filter] = user.crocodoc_id!
9797
end
9898

99-
submissions = attachment.attachment_associations.
100-
where(:context_type => 'Submission').
101-
preload(context: [:assignment]).
102-
map(&:context)
103-
99+
submissions = self.submissions.preload(:assignment)
104100
if submissions.any? { |s| s.grants_right? user, :read_grade }
105101
opts[:filter] = 'all'
106102

spec/models/crocodoc_document_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@
116116
end
117117

118118
it "returns permissions for older submission versions" do
119-
pending
120-
121119
submission2 = @assignment.submit_homework @submitter,
122120
submission_type: "online_upload",
123121
attachments: [crocodocable_attachment_model(context: @submitter)]

0 commit comments

Comments
 (0)