cancel
Showing results for 
Search instead for 
Did you mean: 
shane_ohara
Surveyor

Help with a custom JS File??

Jump to solution

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

Tags (1)
1 Solution

Accepted Solutions
shane_ohara
Surveyor

Our CSM passed me onto our previous implementation consultant for assistance. He sent me the following last night:

"I've followed up with some friends here at the office, and they've let me know that there's currently no way to have global includes specific to custom roles. I wish I had an alternative solution for updating removing this functionality, but at this time I do not. I suggest submitting a feature idea or voting on an existing one.

I can see Cosme Salazar last updated " modifiedtitle="true" title="this feature idea in July explaining why it's difficult for us to make custom roles more granular. I know our production team is working on making the permission sets more detailed, but at this time I have little options available to us. I apologize for any inconveniences this may be causing you."

Looks like we'll have to rethink our approach.

Shane

View solution in original post

4 Replies
kona
Community Coach
Community Coach

 @shane_ohara ​, I can't help directly other than to suggest (1) talk with your CSM - we have some of these buttons hidden from faculty and our CSM is the one who took care of it for us. Yours might have a recommendation or be able to do it for your Institution and (2) you might want to post this or share it with the Canvas Developers​ group - they are the back end programmers and might be more help with the actual coding side of things.

Thank you, Kona. I have sent to the CSM and posted in the Canvas Developers space as well.

Shane

Hi  @shane_ohara ​...

Instead of posting the message in the Canvas Developers space, you should be able to share this posting in that Group as well...that way, you don't have two separate conversations going on about the same topic.  The "Share" link is at the top right corner of this page.

shane_ohara
Surveyor

Our CSM passed me onto our previous implementation consultant for assistance. He sent me the following last night:

"I've followed up with some friends here at the office, and they've let me know that there's currently no way to have global includes specific to custom roles. I wish I had an alternative solution for updating removing this functionality, but at this time I do not. I suggest submitting a feature idea or voting on an existing one.

I can see Cosme Salazar last updated " modifiedtitle="true" title="this feature idea in July explaining why it's difficult for us to make custom roles more granular. I know our production team is working on making the permission sets more detailed, but at this time I have little options available to us. I apologize for any inconveniences this may be causing you."

Looks like we'll have to rethink our approach.

Shane

View solution in original post