canvas-lms/lib
Daniel Lee 8dd26aa761 Don't allow Observers to annotate submissions they're observing
When viewing an assignment in DocViewer, this now checks to see if the user
has an Observer enrollment, and if that enrollment matches the assignment
they're viewing.  If so, the DocViewer session is launched as read-only.

Fixes RD-4403

Test plan:
- Observe a student in canvas
- Have the student submit an assignment
- Have the observer view the submission details page and "View Feedback"
for the assignment
- In the resulting DocViewer iframe, there should be no annotation tools
- The student should still be able to annotate in their submission details
page
- Speedgrader should still have annotation tools available

Change-Id: I8d427d69151fa5ff9087e7a710a3fcd87e7ef8c9
Reviewed-on: https://gerrit.instructure.com/127724
Tested-by: Jenkins
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
Product-Review: Josh Orr <jgorr@instructure.com>
2017-10-02 18:07:04 +00:00
..
active_support/cache trigger consul event of HA Cache invalidation 2017-09-26 15:59:04 +00:00
address_book count_in_contexts instead of count_in_context 2017-07-07 16:52:00 +00:00
api fix mgp related N+1s in courses API 2017-10-02 18:03:52 +00:00
app_center da licença part 25 2017-04-27 21:51:40 +00:00
basic_lti da licença part 26 2017-04-27 21:52:25 +00:00
canvadocs Don't allow Observers to annotate submissions they're observing 2017-10-02 18:07:04 +00:00
canvas ignore remember_authorization when scopes are passed to oath2 2017-09-27 19:16:45 +00:00
cc copy student view restriction settings 2017-09-28 15:28:43 +00:00
data_fixup fix cc cleanup fixup for mixed case email addresses 2017-10-02 17:48:06 +00:00
external_auth_observation da licença part 29 2017-04-27 21:59:53 +00:00
features remove submissions_folder feature flag 2017-09-20 19:33:03 +00:00
latex stringify request ids before signing for mathman 2017-05-16 20:42:39 +00:00
lti Add LTI variable substitutions for brand config urls 2017-09-27 18:04:44 +00:00
messageable_user use in_region_associated_shards in some more places 2017-09-05 15:56:49 +00:00
outcomes da licença part 32 2017-04-27 22:00:01 +00:00
reporting da licença part 33 2017-04-27 22:00:04 +00:00
scribd da licença part 34 2017-04-27 22:00:30 +00:00
services refactor and impove DynamicSettings 2017-09-12 22:34:21 +00:00
sis allow other states for enrollment diffing 2017-09-25 23:21:34 +00:00
stubs da licença part 34 2017-04-27 22:00:30 +00:00
support_helpers da licença part 34 2017-04-27 22:00:30 +00:00
tasks Remove unused canvas:compress_assets rake task 2017-09-29 19:07:12 +00:00
turnitin Replace forward slashes in filenames sent from turnitin with dash 2017-06-20 22:26:01 +00:00
user_content da licença part 36 2017-04-28 17:31:17 +00:00
utils da licença part 36 2017-04-28 17:31:17 +00:00
account_services.rb da licença part 25 2017-04-27 21:51:40 +00:00
action_controller_test_process.rb da licença part 25 2017-04-27 21:51:40 +00:00
address_book.rb da licença part 25 2017-04-27 21:51:40 +00:00
api.rb rails 5.1: all the rest of the specs 2017-07-31 19:48:51 +00:00
api_route_set.rb da licença part 25 2017-04-27 21:51:40 +00:00
asset_signature.rb da licença part 25 2017-04-27 21:51:40 +00:00
assignment_override_applicator.rb da licença part 25 2017-04-27 21:51:40 +00:00
assignment_util.rb da licença part 25 2017-04-27 21:51:40 +00:00
authentication_methods.rb don't raise an error if consul is completely unconfigured 2017-09-12 22:34:51 +00:00
basic_lti.rb da licença part 26 2017-04-27 21:52:25 +00:00
brand_config_helpers.rb da licença part 26 2017-04-27 21:52:25 +00:00
brand_config_regenerator.rb strand brand config regeneration jobs 2017-06-20 20:01:27 +00:00
brandable_css.rb Generate css, json & js files for themes on build 2017-08-09 22:11:43 +00:00
browser.rb da licença part 26 2017-04-27 21:52:25 +00:00
canvadocs.rb Canvadocs hijack crocodoc sessions 2017-05-03 22:11:01 +00:00
canvas.rb put back extra checks for sharing cache with data redis 2017-09-14 21:22:08 +00:00
canvas_logger.rb da licença part 27 2017-04-27 21:53:31 +00:00
canvas_yaml.rb da licença part 27 2017-04-27 21:53:31 +00:00
cc.rb da licença part 27 2017-04-27 21:53:31 +00:00
config_file.rb fix reloader for ConfigFile 2017-06-15 18:45:24 +00:00
content_licenses.rb call translated license names in a lambda 2017-08-14 13:03:04 +00:00
content_notices.rb da licença part 27 2017-04-27 21:53:31 +00:00
content_zipper.rb da licença part 27 2017-04-27 21:53:31 +00:00
copy_authorized_links.rb remove 'copy_authorized_content' as superfluous 2017-07-05 15:43:00 +00:00
course_link_validator.rb bypass the wiki model as much as possible for wiki_pages 2017-08-09 16:09:06 +00:00
custom_validations.rb da licença part 27 2017-04-27 21:53:31 +00:00
cuty_capt.rb da licença part 27 2017-04-27 21:53:31 +00:00
dates_overridable.rb da licença part 28 2017-04-27 21:53:35 +00:00
delayed_message_scrubber.rb da licença part 28 2017-04-27 21:53:35 +00:00
delicious.rb da licença part 28 2017-04-27 21:53:35 +00:00
differentiable_assignment.rb a few more optimizations to CourseProgress#to_json 2017-08-10 17:26:40 +00:00
due_date_cacher.rb ignore concluded enrollments in due date cacher 2017-09-19 19:42:12 +00:00
duplicating_objects.rb Add the ability to duplicate pages. 2017-06-23 20:03:28 +00:00
effective_due_dates.rb ensure graded assignments aren't gradable after removal from overrides 2017-08-28 15:56:43 +00:00
email_address_validator.rb da licença part 29 2017-04-27 21:59:53 +00:00
enrollments_from_user_list.rb also touch user observers for enrolling from user_list 2017-07-25 18:11:50 +00:00
eportfolio_page.rb da licença part 29 2017-04-27 21:59:53 +00:00
external_feed_aggregator.rb da licença part 29 2017-04-27 21:59:53 +00:00
external_statuses.rb da licença part 29 2017-04-27 21:59:53 +00:00
feature.rb upgrade account/user search to ‘hidden_in_prod’ 2017-10-02 16:10:03 +00:00
feature_flags.rb correctly invalidate course/user feature flag cache 2017-09-15 20:19:49 +00:00
file_in_context.rb don't fail when importing a package with invalid attachments 2017-08-30 21:21:34 +00:00
file_splitter.rb da licença part 29 2017-04-27 21:59:53 +00:00
grade_calculator.rb store scores for each assignment group 2017-09-22 14:46:27 +00:00
gradebook_exporter.rb refactor and unify User#find_pseudonym_for_account and SisPseudonym 2017-05-02 18:50:31 +00:00
gradebook_grading_period_assignments.rb replace effective due dates with cached due dates 2017-07-24 15:27:05 +00:00
gradebook_importer.rb better failure handling for invalid gradebook import csv headers 2017-09-27 23:05:36 +00:00
gradebook_settings_helpers.rb da licença part 30 2017-04-27 21:59:55 +00:00
gradebook_user_ids.rb add secondary sorting by sortable_name for user_ids 2017-07-11 22:07:00 +00:00
grading_period_helper.rb da licença part 30 2017-04-27 21:59:55 +00:00
has_content_tags.rb da licença part 30 2017-04-27 21:59:55 +00:00
host_url.rb drop Message#asset_context and DelayedNotification#asset_context 2017-08-22 17:47:51 +00:00
i18n_time_zone.rb rails 5: only include well-known zones in the US time zone list 2017-08-12 14:06:53 +00:00
imported_html_converter.rb da licença part 30 2017-04-27 21:59:55 +00:00
inst_fs.rb inst-fs upload preflight (and capture fixes) 2017-09-27 16:35:40 +00:00
job_live_events_context.rb symbolize live events 2017-05-14 01:30:14 +00:00
late_policy_applicator.rb do not apply late policy to assignments not expecting submission 2017-07-19 22:33:32 +00:00
latex.rb da licença part 31 2017-04-27 21:59:58 +00:00
learning_outcome_context.rb rails 5.1: lib specs 2017-07-20 17:26:51 +00:00
locale_selection.rb da licença part 31 2017-04-27 21:59:58 +00:00
logging_filter.rb da licença part 31 2017-04-27 21:59:58 +00:00
login_hooks.rb da licença part 31 2017-04-27 21:59:58 +00:00
math_man.rb don't raise an error if consul is completely unconfigured 2017-09-12 22:34:51 +00:00
message_dispatcher.rb da licença part 32 2017-04-27 22:00:01 +00:00
message_scrubber.rb da licença part 32 2017-04-27 22:00:01 +00:00
messageable_user.rb da licença part 32 2017-04-27 22:00:01 +00:00
missing_policy_applicator.rb do not apply late policy to assignments not expecting submission 2017-07-19 22:33:32 +00:00
model_cache.rb da licença part 32 2017-04-27 22:00:01 +00:00
multi_cache.rb configure multicache via consul 2017-09-12 22:49:16 +00:00
must_view_module_progressor.rb da licença part 32 2017-04-27 22:00:01 +00:00
mutable.rb da licença part 32 2017-04-27 22:00:01 +00:00
net_ldap_extensions.rb da licença part 32 2017-04-27 22:00:01 +00:00
notification_message_creator.rb drop Message#asset_context and DelayedNotification#asset_context 2017-08-22 17:47:51 +00:00
open_object.rb da licença part 32 2017-04-27 22:00:01 +00:00
outcome_attributes.rb da licença part 32 2017-04-27 22:00:01 +00:00
outcome_importer.rb da licença part 32 2017-04-27 22:00:01 +00:00
permissions.rb da licença part 33 2017-04-27 22:00:04 +00:00
plannable.rb ensure planable bookmarks are set in utc time zone 2017-07-14 12:08:53 +00:00
progress_runner.rb da licença part 33 2017-04-27 22:00:04 +00:00
request_cache.rb da licença part 33 2017-04-27 22:00:04 +00:00
request_error.rb da licença part 33 2017-04-27 22:00:04 +00:00
rubric_context.rb da licença part 33 2017-04-27 22:00:04 +00:00
scope_filter.rb da licença part 34 2017-04-27 22:00:30 +00:00
search_term_helper.rb da licença part 34 2017-04-27 22:00:30 +00:00
send_to_stream.rb da licença part 34 2017-04-27 22:00:30 +00:00
sentry_proxy.rb da licença part 34 2017-04-27 22:00:30 +00:00
session_token.rb API for initiating a web session from an access token 2017-06-15 22:38:47 +00:00
simple_stats.rb da licença part 34 2017-04-27 22:00:30 +00:00
simple_tags.rb da licença part 34 2017-04-27 22:00:30 +00:00
sis.rb da licença part 34 2017-04-27 22:00:30 +00:00
sorts_assignments.rb da licença part 34 2017-04-27 22:00:30 +00:00
ssl_common.rb da licença part 34 2017-04-27 22:00:30 +00:00
stats.rb da licença part 34 2017-04-27 22:00:30 +00:00
sticky_sis_fields.rb da licença part 34 2017-04-27 22:00:30 +00:00
submission_list.rb fix gradebook_history to ignore placeholder submissions 2017-06-20 18:23:35 +00:00
submittable.rb drop rails 4.2 2017-06-27 15:29:51 +00:00
submittables_grading_period_protection.rb da licença part 34 2017-04-27 22:00:30 +00:00
summary_message_consolidator.rb speed up SummaryMessageConsolidator a bit 2017-07-26 22:54:29 +00:00
syslog_wrapper.rb da licença part 34 2017-04-27 22:00:30 +00:00
temp_cache.rb da licença part 35 2017-04-28 17:30:19 +00:00
text_helper.rb da licença part 35 2017-04-28 17:30:19 +00:00
time_zone_helper.rb da licença part 35 2017-04-28 17:30:19 +00:00
timed_cache.rb da licença part 35 2017-04-28 17:30:19 +00:00
turnitin.rb da licença part 35 2017-04-28 17:30:19 +00:00
turnitin_id.rb da licença part 35 2017-04-28 17:30:19 +00:00
unzip_attachment.rb don't delete identical existing files on re-import 2017-07-05 19:14:48 +00:00
user_content.rb da licença part 36 2017-04-28 17:31:17 +00:00
user_list.rb da licença part 36 2017-04-28 17:31:17 +00:00
user_list_v2.rb find the correct pseudonym in UserListV2 when search by cc 2017-08-29 00:31:40 +00:00
user_merge.rb cleanup invalid quiz_submissions on user merge 2017-08-22 16:49:22 +00:00
user_search.rb add a role filter to User Search 2017-08-11 20:05:21 +00:00
vericite.rb VeriCite: get all scores for an assignment in bulk 2017-05-24 17:09:57 +00:00
visibility_plucking_helper.rb da licença part 36 2017-04-28 17:31:17 +00:00
zip_extractor.rb da licença part 36 2017-04-28 17:31:17 +00:00