How to hide menu button for a specific user role

how to hide the option new company option for a specific role

Help @NCP

Hi @PRaful_9898
Please try this code. I hope you will help

frappe.listview_settings['Doctype Name'].refresh = function(listview) {
    $(".icon-btn").hide()
};

Thank You!