Commit 047e5681 authored by jcnventura's avatar jcnventura

Fix #370870: do not delete node-specific settings when users without...

Fix #370870: do not delete node-specific settings when users without permission to change them edit a node
parent 0c5d4b95
......@@ -319,7 +319,9 @@ function print_nodeapi_load($nodes, $types) {
* Implementation of hook_nodeapi_update().
*/
function print_nodeapi_update($node) {
_print_node_conf_modify($node->nid, $node->print_display, $node->print_display_comment, $node->print_display_urllist);
if (user_access('administer print') || user_access('node-specific print configuration')) {
_print_node_conf_modify($node->nid, $node->print_display, $node->print_display_comment, $node->print_display_urllist);
}
}
/**
......
......@@ -220,7 +220,9 @@ function print_mail_nodeapi_load($nodes, $types) {
* Implementation of hook_nodeapi_update().
*/
function print_mail_nodeapi_update($node) {
_print_mail_node_conf_modify($node->nid, $node->print_mail_display, $node->print_mail_display_comment, $node->print_mail_display_urllist);
if (user_access('administer print') || user_access('node-specific print configuration')) {
_print_mail_node_conf_modify($node->nid, $node->print_mail_display, $node->print_mail_display_comment, $node->print_mail_display_urllist);
}
}
/**
......
......@@ -239,7 +239,9 @@ function print_pdf_nodeapi_load($nodes, $types) {
* Implementation of hook_nodeapi_update().
*/
function print_pdf_nodeapi_update($node) {
_print_pdf_node_conf_modify($node->nid, $node->print_pdf_display, $node->print_pdf_display_comment, $node->print_pdf_display_urllist);
if (user_access('administer print') || user_access('node-specific print configuration')) {
_print_pdf_node_conf_modify($node->nid, $node->print_pdf_display, $node->print_pdf_display_comment, $node->print_pdf_display_urllist);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment