@Chris_Hofer , I am not exactly sure what code you are using for your "add_global_nav_links", but if you want to target users with a specific role, you can take advantage of the ENV JavaScript variable that exists in Canvas. Here are some examples:
if ($.inArray('student', ENV.current_user_roles) !== -1) {
// Run code you want students to see
}
if ($.inArray('teacher', ENV.current_user_roles) !== -1) {
// Run code you want teachers to see
}
if ($.inArray('admin', ENV.current_user_roles) !== -1) {
// Run code you want admins to see (or something you just don't want anyone else to see)
}
This variable doesn't include any custom roles at an institution, but it is very helpful for student/teacher/admin situations.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.