canvas-lms/spec/presenters
Jackson Howe 827e0dba19 Validate k5 based off flag and account setting
When an account enables k5 mode, store that account's id in its root
account's settings hash. Similarly, when an account disables the
setting, remove it from the set.

Also updates the checks on the dashboard to see if a user should see
the k5 dashboard based on whether they're associated with an account
who has enabled the k5 setting and with a root account where the FF is
enabled.

flag=canvas_for_elementary
closes LS-1919
closes LS-1920

Test plan:
 - Have an account with a subaccount
 - Enable k5 FF at the root
 - In the subaccount's account settings, enable the k5 setting
 - In a rails console, expect
   `Account.find({root_id}).settings[:k5_accounts]` to include the
   account id of the subaccount
 - Disable the subaccount k5 setting
 - Expect the query to now not include anything
 - Enroll a user in a course that's part of a subaccount with the
   k5 setting enabled
 - On that user's dashboard, expect to see k5 dashboard
 - Disable either the setting or the flag; expect to see traditional
   dashboard
 - Expect other user's dashboards not to be affected

Change-Id: I7a70a10063fad8f78677cf8be9be77cbdb1a49d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-03-08 20:08:13 +00:00
..
quizzes add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
submission persist resource_link_lookup_uuid at homework submission 2021-02-19 17:58:11 +00:00
assignment_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
authentication_providers_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
course_for_menu_presenter_spec.rb Validate k5 based off flag and account setting 2021-03-08 20:08:13 +00:00
discussion_topic_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
grade_summary_assignment_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
grade_summary_presenter_spec.rb filters out future sections in observer grades 2021-02-03 22:28:15 +00:00
grades_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
grading_period_grade_summary_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
mark_done_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
override_list_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
override_tooltip_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
section_tab_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
to_do_list_presenter_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00