mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 19:35:09 +00:00
added all_read condition to check if user can read
This commit is contained in:
@@ -32,7 +32,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
$(wrapper).find('[href*="List/"]').each(function() {
|
||||
var href = $(this).attr('href');
|
||||
var dt = href.split('/')[1];
|
||||
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
@@ -41,7 +41,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
// reports
|
||||
$(wrapper).find('[data-doctype]').each(function() {
|
||||
var dt = $(this).attr('data-doctype');
|
||||
if(wn.boot.profile.can_read.indexOf(dt)==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(dt)==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ erpnext.module_page.hide_links = function(wrapper) {
|
||||
$(wrapper).find('[href*="Form/"]').each(function() {
|
||||
var href = $(this).attr('href');
|
||||
var dt = href.split('/')[1];
|
||||
if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
|
||||
var txt = $(this).text();
|
||||
$(this).parent().css('color', '#999').html(txt);
|
||||
}
|
||||
|
||||
@@ -2253,7 +2253,7 @@ $(document).bind('startup',function(){erpnext.startup.start();});
|
||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||
wn.updates.id=setInterval(update_messages,60000);}
|
||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
||||
$(document).bind('startup',function(){erpnext.startup.start();});
|
||||
$(document).bind('startup',function(){erpnext.startup.start();});
|
||||
/*
|
||||
* erpnext/startup/js/modules.js
|
||||
*/
|
||||
|
||||
@@ -1 +1 @@
|
||||
783
|
||||
784
|
||||
Reference in New Issue
Block a user