[Roles] Specify approved roles by user domain or SIS prefix

Problem statement:

Manually created courses are used for clubs with student leaders managing content. However, some roles like Teacher and Admin should NOT be used for students as this provisions them into other systems with greater access than desired. While we can successfully use the Designer role for these needs, we want to prohibit students from getting manually added to a course as Teacher, Admin, or TA. Our recommendation is for the customization of which roles are approved within an instance can be specified by the institution. Please note that we do not want to disable manually adding users as there are many benefits to this functionality.

Proposed solution:

Here are examples of how we could configure this: Limit course roles: - Admin (requires SIS starting with staff_ OR email address @dvusd.org) - Teacher (requires SIS starting with staff_ OR email address @dvusd.org) - TA (requires SIS starting with staff_ OR email address @dvusd.org) Alternative approach: Staff permission (based on SIS starting with staff_ OR email address @dvusd.org) - approved course roles: ALL Student permission (based on SIS starting with student_ OR email address @Learner.dvusd.org) - approved course roles: Student, Designer, Observer

User role(s):

admin,instructor,student,ta,designer,observer