CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Denied access to contact after editing contact.
Pages: [1]

Author Topic: Denied access to contact after editing contact.  (Read 1372 times)

Blake

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 5
    • LinkedIn Profile
Denied access to contact after editing contact.
September 01, 2009, 11:08:09 am
On our CiviCRM 2.2.8 install, users with access limited to edit individuals in specific smart groups get the following error when editing contacts: "Your Individual contact record has been saved. You do not have the necessary permission to view this contact."

Upon checking the individual contacts that were edited I noticed they weren't listed as being a part of any group. I believe there is some strangeness with the way smart groups work that users don't always have full permission to access contacts in those groups because the contacts don't always appear to be in those groups. Makes sense, but sounds like a bug.

Any solutions or work arounds?

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Denied access to contact after editing contact.
September 01, 2009, 12:35:12 pm
A stupid question probably but the 'edit' wasn't changing the characteristic that was being used to create the smart group??

I only ask as some clients have edited the province of a user, when the province is what sets them in the Group - and hence the ACL control - and then the wonder/complain why they can't see them any longer.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Blake

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 5
    • LinkedIn Profile
Re: Denied access to contact after editing contact.
September 01, 2009, 12:57:46 pm
Thanks for the reply. What you suggest would also produce the same behavior, but is not the fundamental issue here. I also logged in as the user, inputted a city for one contact and got the message when taken back to dashboard. Edited the source on another contact and got the same behavior. Smart groups are by home state, so neither one of these edits should throw me back to the dashboard.

Like I mentioned though, I thought it was interesting and possibly part of the problem that no contacts in the smart group had that group listed in their group tab.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Denied access to contact after editing contact.
September 01, 2009, 01:01:41 pm
there is some caching involved in Smart Groups now isn't there = might that be part of the issue?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Blake

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 5
    • LinkedIn Profile
Re: Denied access to contact after editing contact.
September 01, 2009, 01:11:58 pm
Tried to do a little background research on caching but didn't find anything relevant, so couldn't tell you if that is part of the issue.

Is there a way to disable it or check?

Blake

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 5
    • LinkedIn Profile
Re: Denied access to contact after editing contact.
September 01, 2009, 02:08:13 pm
Update. Cleared the cache using phpmyadmin, still get the strange behavior when saving contacts.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Denied access to contact after editing contact.
September 01, 2009, 09:11:41 pm

hey blake:

1. are those 2 contacts in the smart group to begin with?

2. with view contact, we basically check and ensure that the contact being viewed in in the "restricted" group for that profile

edit/create is a bit looser. if we had the same rule as above, we would not be able to add any new contacts via the profile.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Blake

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 5
    • LinkedIn Profile
Re: Denied access to contact after editing contact.
September 01, 2009, 09:29:44 pm
1. The contacts are in the smart group to begin with.
2. Not completely sure what you mean here, but it sounds like you are saying that the contact viewed is checked to make sure its not in a group the user doesn't have access to. Obviously the user has access when viewing the contact when all contacts from the smart group are returned, but somehow after editing the user is denied access to that contact - until you view the members of the smart group again and that contact shows up again.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Denied access to contact after editing contact.
September 01, 2009, 09:32:49 pm

argh

definitely a bug

can you please file an issue, we'll take a look and fix

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Denied access to contact after editing contact.

This forum was archived on 2017-11-26.