Author Topic: Linked Contacts for Non administrators  (Read 3267 times)

evermorev

  • Newbie
  • *
  • Posts: 13
    • View Profile
Linked Contacts for Non administrators
« on: May 27, 2009, 03:00:14 pm »
Hi there,

Excellent software, however I think I detected a bug.

For people who ARE NOT administrators they cannot see linked contacts on the data summary page. They can however see linked ALL other types of data such as notes or calendar appts etc. They can also see linked contacts IF they edit the item.

This goes across ALL data types basically when a regular user non admin links a contact they can see it then when they hit save and goto the summary view the contact is not listed but if they edit the data again they can see the linked contact.

ADMINs on the other hand do see the linked contacts to the dataset. Again this is across all datasets when a regular user links a contact it DOES save it but just does not show the linked contact int he summary view although it does show all other linked data types.

Kind of confusing I know and why it would just be this and only for regular users is odd but there you go.

Any ideas?

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: Linked Contacts for Non administrators
« Reply #1 on: May 28, 2009, 10:17:11 am »
Hi,
Are you using version 1.4 or 1.4.1?
I thought we fixed this bug for 1.4.1

evermorev

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Linked Contacts for Non administrators
« Reply #2 on: May 28, 2009, 11:18:23 am »
I am sorry, I am using 1.4.1

evermorev

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Linked Contacts for Non administrators
« Reply #3 on: June 08, 2009, 12:41:34 pm »
Yes I am using 1.4.1 and the bug still exists, could you post a quick cut and paste snippet of code to fix this and for what file?

evermorev

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Linked Contacts for Non administrators
« Reply #4 on: June 16, 2009, 02:47:27 pm »
I upgraded to 1.4.2 and this bug still exists. Could someone please reply on this that it is in fact a confirmed bug and maybe a hot patch posted here to fix it?  ;D

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Linked Contacts for Non administrators
« Reply #5 on: June 24, 2009, 04:44:26 pm »
Hi, try changing file 'application/views/object/list_linked_objects.php' around line 23, from:

Code: [Select]
if  ($linked_object instanceof Contact){ // if it is a contact
    if (!can_manage_contacts(logged_user()) ) continue; // check permissions on contacts
}

to:

Code: [Select]
if  ($linked_object instanceof Contact){ // if it is a contact
    if (!$linked_object->canView(logged_user()) ) continue; // check permissions on contacts
}

This will allow a normal user to view contacts assigned to a workspace. If you want the user to be able to view all contacts you have to give him permission to "manage contacts" on the user's edition view.

Sorry for the delay in the answer! We are now seeing the tasks bug you reported.

Cheers.