mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fixed: hide links based on roles in accounts home
This commit is contained in:
@@ -128,7 +128,10 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
|
||||
// pages
|
||||
$(wrapper).find('[data-role]').each(function() {
|
||||
if(!has_common(user_roles, [$(this).attr("data-role"), "System Manager"])) {
|
||||
// can define multiple roles
|
||||
var data_roles = $(this).attr("data-role").split(",").map(function(role) {
|
||||
return role.trim(); });
|
||||
if(!has_common(user_roles, ["System Manager"].concat(data_roles))) {
|
||||
var html = $(this).html();
|
||||
$(this).parent().css('color', '#999');
|
||||
$(this).replaceWith('<span title="Only accessible by Roles: '+
|
||||
|
||||
Reference in New Issue
Block a user