cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Here are the steps:
1) Create a new plugin.
2) Open widget.js for editing.
3) In this file, we'll use the dashboardLoaded event to register the logic when the dashboard finished loading. For example, if we'd like to remove the new widget button if the logged in user is a designer:
// registering the event handler
prism.on("dashboardloaded", function(){
    
    if (prism.user.roleName == 'contributor'){
        
        $('.new-widget').remove();
        console.log("Designer logged in -> new widget button removed");
    }   
});
Rate this article:
Version history
Last update:
‎02-07-2024 01:28 PM
Updated by:
Contributors