canvas-lms/ui/features/course_list
Jackson Howe 0a88158e34 Restrict course creation based off new setting
If the root account's teachers_can_create_courses_anywhere? or
students_can_create_courses_anywhere? setting is false and the user
is not a k5 user, they will only be able to create courses in the
manually created courses subaccount (assuming they have permission
to create courses at all).

closes LS-2780
flag = create_course_subaccount_picker

Test plan:
Part 1
 - Enable create_course_subaccount_picker flag
 - Visit the root account settings page and allow teachers, students,
   and users with no enrollments to create courses
 - As each of those user types, visit the dashboard (or course index)
   and click '+ Course'
 - Expect to see a list of subaccounts for teacher and student, and no
   list for the user with no enrollments
Part 2
 - Back in settings, set the radio buttons under teacher and student to
   restrict course creation to the MCC account
 - As the teacher and student, open the create course modal
 - If the user has no k5 enrollments, expect to not have a list of
   subaccounts anymore; if the user does have k5 enrollments, expect the
   subaccount list to still be there
Part 3
 - Disable course creation for all user types in settings
 - As each of those users, expect to not see the create course buttons

Part 4
 - Expect admins to always be able to create courses
 - Disable the create_course_subaccount_picker flag and expect the old UI
   to work as before

Change-Id: I1f1b91ba15511d51844e7eda3da2d0a5d4b2d3ea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277069
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-11-09 19:19:20 +00:00
..
index.js Restrict course creation based off new setting 2021-11-09 19:19:20 +00:00