AnsweredAssumed Answered

Help with a custom JS File??

Question asked by shane.ohara@unh.edu on Sep 8, 2015
Latest reply on Sep 9, 2015 by shane.ohara@unh.edu

Hello,

I am seeking some support to hide certain elements (buttons) from a new account-level admin role.

 

History: account-level permissions are not granular enough to remove access to certain buttons (create new course, conclude course, delete course, etc.) when you assign the "Manage Courses" permission to a new account-level admin. This permission is necessary in order for a team of staff to see the "Student View" button and items listed on the "Syllabus" page, among other course options.

 

What I need assistance with: I need to hide buttons that this team of staff received by virtue of the permission, but need to do so through our custom JS file. Currently we have delete, conclude, and reset courses hidden through JS to anyone without the "admin" role, but by doing so this allows the secondary account-level admin role access to the buttons, and others (create a new course, etc.)

 

I am using the following to start my JS:

$(document).ready(function(){

if($.inArray('admin',ENV['current_user_roles']) == -1) {

 

How can I revise this to declare that only the "Account Admin" and not any other manually created account-level admin can have access?

 

Many thanks,

Shane

Outcomes