Index: content.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cck/Attic/content.module,v retrieving revision 1.301.2.106.2.3 diff -u -p -r1.301.2.106.2.3 content.module --- content.module 8 Jul 2009 15:15:51 -0000 1.301.2.106.2.3 +++ content.module 13 Jul 2009 16:29:23 -0000 @@ -787,7 +787,7 @@ function content_field($op, &$node, $fie '#type' => 'content_field', '#title' => check_plain(t($field['widget']['label'])), '#field_name' => $field['field_name'], - '#access' => $formatter_name != 'hidden' && content_access('view', $field), + '#access' => $formatter_name != 'hidden' && content_access('view', $field, NULL, $node), '#label_display' => $label_display, '#node' => $node, '#teaser' => $teaser, @@ -1780,7 +1780,7 @@ function content_format($field, $item, $ $field = content_fields($field); } - if (content_access('view', $field) && $formatter = _content_get_formatter($formatter_name, $field['type'])) { + if (content_access('view', $field, NULL, $node) && $formatter = _content_get_formatter($formatter_name, $field['type'])) { $theme = $formatter['module'] .'_formatter_'. $formatter_name; $element = array( @@ -2185,18 +2185,20 @@ function content_default_value(&$form, & * The field on which the operation is to be performed. * @param $account * (optional) The account to check, if not given use currently logged in user. + * @param $node + * (optional) The node on which the operation is to be performed. * @return * TRUE if the operation is allowed; * FALSE if the operation is denied. */ -function content_access($op, $field, $account = NULL) { +function content_access($op, $field, $account = NULL, $node = NULL) { global $user; if (is_null($account)) { $account = $user; } - $access = module_invoke_all('field_access', $op, $field, $account); + $access = module_invoke_all('field_access', $op, $field, $account, $node); foreach ($access as $value) { if ($value === FALSE) { return FALSE; Index: includes/content.node_form.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/Attic/content.node_form.inc,v retrieving revision 1.7.2.19.2.2 diff -u -p -r1.7.2.19.2.2 content.node_form.inc --- includes/content.node_form.inc 1 Jul 2009 18:37:26 -0000 1.7.2.19.2.2 +++ includes/content.node_form.inc 13 Jul 2009 16:31:07 -0000 @@ -77,7 +77,7 @@ function content_field_form(&$form, &$fo // See if access to this form element is restricted, // if so, skip widget processing and just set the value. - $access = content_access('edit', $field); + $access = content_access('edit', $field, NULL, $node); if (!$access) { $addition[$field_name] = array( '#access' => $access, Index: includes/panels/content_types/content_field.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/panels/content_types/Attic/content_field.inc,v retrieving revision 1.1.2.4.2.3 diff -u -p -r1.1.2.4.2.3 content_field.inc --- includes/panels/content_types/content_field.inc 12 Jul 2009 20:24:55 -0000 1.1.2.4.2.3 +++ includes/panels/content_types/content_field.inc 13 Jul 2009 16:31:45 -0000 @@ -80,7 +80,7 @@ function content_content_field_content_t $formatter = $conf['formatter']; // Check view access to the field. - if (!content_access('view', $field)) { + if (!content_access('view', $field, NULL, $node)) { return; } Index: modules/content_permissions/content_permissions.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cck/modules/content_permissions/Attic/content_permissions.module,v retrieving revision 1.5.2.5 diff -u -p -r1.5.2.5 content_permissions.module --- modules/content_permissions/content_permissions.module 27 Dec 2008 22:22:55 -0000 1.5.2.5 +++ modules/content_permissions/content_permissions.module 13 Jul 2009 16:32:47 -0000 @@ -18,7 +18,7 @@ function content_permissions_perm() { * * @see content_access(). */ -function content_permissions_field_access($op, $field, $account) { +function content_permissions_field_access($op, $field, $account, $node = NULL) { switch ($op) { case 'view': case 'edit':