Answers.Body: <p>This is directly not available through UI, but you can do this by creating your own extension and using hooks like post and queryobject.</p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-16T12:42:18.377Z
Answers.LastActivityDate: 2018-05-16T12:42:18.377Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>You can achieve this via UI with <a href="https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/#native-civicrm-acls" rel="nofollow noreferrer">ACLs</a>, but it is somewhat messy and does have some performance implications:</p>
  
  <ul>
  <li>Use the Include / Exclude Search to search for all contacts but your specific group by excluding it and create a smart group for it</li>
  <li>Remove the CMS permission to view / edit all contacts for your desired CMS user role</li>
  <li>Assign an ACL to read / edit your newly created smart group for your desired ACL role</li>
  <li>Assign users to the ACL roles</li>
  </ul>
  
  <p>Perhaps you can play around with the Drupal Rules module and its <a href="https://civicrm.org/blog/lobo/civicrm-integration-with-drupal-rules-module" rel="nofollow noreferrer">CiviCRM integration</a> to block users beeing added to a group.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-16T17:28:23.150Z
Answers.LastActivityDate: 2018-05-16T17:28:23.150Z
Answers.UserDisplayName: Thomas Schüttler
Body: <p>I am looking for hiding contacts in CiviCRM from search results,added to specific group and also Drupal user should be blocked in automatically soon after adding them to a group.Soft delete using civirules is one option.But I don't want the user to get trashed.Any help?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-17T10:11:31.227Z
Comments.Text: i think you need to try and explain this a bit more clearly. eg 'blocked' for a user makes sense, but 'thrashed' doesn't. And are you talking about 'drupal users' when you say 'soft delete' as I don't associate that term with Users but I do with Contacts.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-17T15:06:24.543Z
Comments.Text: Sorry if I have not clearly explain. Using Civirules, a contact added to a group can be soft deleted so the contact will not be available in quick search results
Comments.UserDisplayName: preeti
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-17T21:27:30.840Z
Comments.Text: Can you edit your question then to be clear where you are talking about Contacts v Users. It helps if you don't use them interchangeably since they mean quite different entities
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-21T19:44:36.310Z
Comments.Text: i changed 'thrased' to 'trashed'. hopefully that is what you meant.
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal><groups><search-results>
Title: Hide contacts from search results ,added to specific group
ThreadText: # Hide contacts from search results ,added to specific group
  
  (Asked by: username_0 on 2018-05-16)
  
  I am looking for hiding contacts in CiviCRM from search results,added to specific group and also Drupal user should be blocked in automatically soon after adding them to a group.Soft delete using civirules is one option.But I don't want the user to get trashed.Any help?
  
  **Tags:** drupal, groups, search-results
  
  > **Comments:**
  > **username_1**: i think you need to try and explain this a bit more clearly. eg 'blocked' for a user makes sense, but 'thrashed' doesn't. And are you talking about 'drupal users' when you say 'soft delete' as I don't associate that term with Users but I do with Contacts.  
  > **username_0**: Sorry if I have not clearly explain. Using Civirules, a contact added to a group can be soft deleted so the contact will not be available in quick search results  
  > **username_1**: Can you edit your question then to be clear where you are talking about Contacts v Users. It helps if you don't use them interchangeably since they mean quite different entities  
  > **username_1**: i changed 'thrased' to 'trashed'. hopefully that is what you meant.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-05-16. Score: 1
  
  This is directly not available through UI, but you can do this by creating your own extension and using hooks like post and queryobject.
  
  HTH
  
  username_2
  
  
  ---
  
  ### Answer by username_3 on 2018-05-16. Score: 1
  
  You can achieve this via UI with [ACLs](https://docs.civicrm.org/user/en/latest/initial-set-up/permissions-and-access-control/#native-civicrm-acls), but it is somewhat messy and does have some performance implications:
  
  * Use the Include / Exclude Search to search for all contacts but your specific group by excluding it and create a smart group for it
  * Remove the CMS permission to view / edit all contacts for your desired CMS user role
  * Assign an ACL to read / edit your newly created smart group for your desired ACL role
  * Assign users to the ACL roles
  
  Perhaps you can play around with the Drupal Rules module and its [CiviCRM integration](https://civicrm.org/blog/lobo/civicrm-integration-with-drupal-rules-module) to block users beeing added to a group.
  
  
  ---
  
  