We've been using JS to customize permissions when there wasn't a permissions setting. Not the best way - but seems like the only way. If you don't mind providing an example, I'll compare it to what we use for blocking course reset and delete from instructors. Our JS blocks based on roles in any course, which is not ideal since it blocks admins also if they have an instructor enrollment in a course.
Plus, users could still use API if they really wanted to.
What we currently have (blocks add, modify, remove section; delete, reset, conclude course):
if (ENV.current_user_roles.indexOf("teacher") >= 1){
$("a[href*='confirm_action?event=conclude']").hide();
$("a.btn.button-sidebar-wide.delete_course_link").hide();
$("a.btn.button-sidebar-wide.reset_course_content_button").hide();
$("#add_section_form").hide();
$('a.no-hover.edit_section_link').hide();
$('a.no-hover.cant_delete_section_link').hide();
$('a.delete_section_link').hide();
Thanks,
Anthony Hess
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.