To fix, add

function access() {
return TRUE;
}

to views\modules\contact\views_handler_field_contact_link.inc

If users do not have access to an individual's contact form then render() will return empty string because of permission check there. As is, column is entirely missing which causes problems when displaying in table format.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Status: Active » Closed (works as designed)

The existing behavior is the intended behavior. how is it a bug that users are prevented from viewing items they do not have access to view?

joachim’s picture

Version: 6.x-2.8 » 6.x-3.x-dev
Status: Closed (works as designed) » Needs review
FileSize
1.65 KB

Nope, this is a bug -- just the OP meant to say "If users do not have access to an individual's *PROFILE*".

Users without 'access user profiles' are still given access to the contact form tab, but they are blocked from seeing the contact form link views field because views_handler_field_contact_link inherits access from its parent.

Patch on Views 2/3, tested on 2 but not 3.

dawehner’s picture

+++ modules/contact/views_handler_field_contact_link.inc	3 Jun 2010 11:16:25 -0000
@@ -26,13 +26,26 @@ class views_handler_field_contact_link e
+      return;

what about a return FALSE, this might make more sense.

Powered by Dreditor.

joachim’s picture

Priority: Minor » Normal
FileSize
1.61 KB

Good point. Changed that and fixed that bit of whitespace.

dawehner’s picture

+++ modules/contact/views_handler_field_contact_link.inc	4 Jun 2010 07:02:19 -0000
@@ -1,5 +1,5 @@
+// $Id: views_handler_field_contact_link.inc,v 1.2 2009/09/21 21:18:10 merlinofchaos Exp $

any reason for this?

This is not the mest if earl wants the patch, there might be conflicts at this line :)

Powered by Dreditor.

The rest is rtbc

joachim’s picture

Arg... ;)

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Works fine and looks fine.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)
Issue tags: -views user contact link

Automatically closed -- issue fixed for 2 weeks with no activity.