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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • hide blocked contacts
Pages: [1]

Author Topic: hide blocked contacts  (Read 1630 times)

veelineen

  • Guest
hide blocked contacts
July 31, 2008, 02:37:34 am
would it be possible to hide blocked contacts (blocked within drupal) within civicrm search results?
We want to save contribution from a user within drupal, so closing an account means just blocking it. They will still appear in civicrm search results. I'm able to delete just the civicrm entry from a user, but maybe there's an other way?

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: hide blocked contacts
August 03, 2008, 06:42:31 pm

A blocked user is usually used for spam users or users that misbehave in a community. Can you give a clearer use case for why you want them blocked (as opposed to deleted) AND not show up in CiviCRM search results?

Thoughts on perfectly good approaches:
(1) For every blocked user, tag, flag via custom field, put them into a group, their CiviCRM contact, allowing you to filter them from search results.
(2) For every blocked user, assign them to a special organic group and use the og group sync drupal contributed module to sync them to a civicrm group and filter the search results on that.
(3) delete instead of block drupal users.
(4) Code something in drupal that automatically adds blocked users to one of the data stores in (1) or deletes the civicrm contact.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

veelineen

  • Guest
Re: hide blocked contacts
August 11, 2008, 07:48:43 am
We use drupal with civicrm for an intranet. When people stop working for our company we want there information still at the site, not moved to an anonymous user. That's why we block accounts instead of deleting them.

I tried using ACL.
I created three groups: A: 'working-at-company', B: 'not-working-at-company', C: 'administrators'. I added all users to group A and the two administrators to group C. I then removed the blocked users from group A and added them to group B. Then I connected the group A with the role authenticated and I connected group C with the role administrator.
I set up the following ACL's:
* role authenticate: view group A, view profile 'contact' (the profile we use for custom search), edit 'contact'  (so people can still edit their own information)
* role administrator: view group B

I removed access all custom data and profile listings and forms from drupal access.

I thought this would give me the following result:
* administrators would be able to view group A & B
* people from group A would only be able to view contacts from group A

Everyone can still search as before but results from group B are still showing when a member of group A is using the search. What's going wrong?

veelineen

  • Guest
Re: hide blocked contacts
August 11, 2008, 07:52:19 am
found what I'm looking for. I can restrict profile search to a specific group. Still leaves the question about ACL's though

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: hide blocked contacts
August 11, 2008, 11:46:48 am

authenticated is a special role and is similar to drupal's authenticated role. Any user who has logged in has the authenticated role. You'll need to create another role called: "employee access" (or something) and give permissions to this role and remove all permissions from authenticated

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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • hide blocked contacts

This forum was archived on 2017-11-26.