Answers.Body: <p>You will need to create an extension and use acl where clause hook to restrict view/edit operation for a contact.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-20T09:53:13.853Z
Answers.Text: Thanks Pradeep, the way you say it it sounds super easy - do you have any hints on how to do it, possibly with some examples (just found civix in the docs, but this still looks a bit abstract to me as i'm not a real profound coder).
Answers.UserDisplayName: markusk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-20T09:56:05.237Z
Answers.Text: 1. Create an extension using civix. 2. Use aclWhereClause hook  to give access list of contacts to logged in user. All the documentation are provided under aclWhereClause hook
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-20T10:03:18.890Z
Answers.Text: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_aclWhereClause/.  If you are willing to sponsor i can have an extension develop for you to perform above permissioning. Can reach me at pradpnayak at gmail dot com
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-20T23:05:12.503Z
Answers.Text: i might get back to your offer, just gotta rethink our requirements with the possibilities of a custom solution - there could be a more useful way to do it for us as well as others.. and well, i'd need to check with our budget.. thanks, markus.
Answers.UserDisplayName: markusk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-20T03:37:17.573Z
Answers.LastActivityDate: 2018-01-20T03:37:17.573Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>We're a non-profit swimming club, just starting out with CiviCRM. We're offering ~20 courses per semester and already set up registration for those with CiviEvent.</p>
  
  <p>For an ideal setup i'd now need to be able to assign a responsible Trainer to each of the courses and give this person access to the registered participants contact data (only) and send e-mails (possibly sms in future) to these (groups of) participants.</p>
  
  <p>What i've seen so far it seems that the usual ACL system isn't quite prepared for this as i'd need to create 20 roles, assigning 20 groups with mostly just one person (trainer) in it.. or am i not thinking the CiviCRM-way yet? (or have i possibly overlooked a way to assign ACLs to single users?)</p>
  
  <p>also found this
  <a href="https://civicrm.org/extensions/view-my-event-participants" rel="nofollow noreferrer">https://civicrm.org/extensions/view-my-event-participants</a>
  which looks promising, but isn't quite ideal (yet) either. first off i'd need to hack something to change the event's creators (which usually isn't the trainer), and from a first test it seems that in CiviMail i only get access to single contacts (not groups).</p>
  
  <p>thanks for any hints,
  markus.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-16T19:15:20.017Z
Comments.Text: It would respectful of the time folk in the community spend helping with questions such as yours if you would acknowledge their answer and hopefully accept it and give it a +1
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-16T20:08:01.730Z
Comments.Text: Pradeep's answer is good - but for 20 groups I might try the ACL role approach.  I've done the same for comparable numbers.  20 is right around the point I'd consider a custom extension like Pradeep's offering.  Also - I've worked with Pradeep, and he does very good work!
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civievent><civimail><acl><plugin>
Title: How to give fine grained access to communicating with selected contacts only?
ThreadText: # How to give fine grained access to communicating with selected contacts only?
  
  (Asked by: username_0 on 2018-01-20)
  
  We're a non-profit swimming club, just starting out with CiviCRM. We're offering ~20 courses per semester and already set up registration for those with CiviEvent.
  
  For an ideal setup i'd now need to be able to assign a responsible Trainer to each of the courses and give this person access to the registered participants contact data (only) and send e-mails (possibly sms in future) to these (groups of) participants.
  
  What i've seen so far it seems that the usual ACL system isn't quite prepared for this as i'd need to create 20 roles, assigning 20 groups with mostly just one person (trainer) in it.. or am i not thinking the CiviCRM-way yet? (or have i possibly overlooked a way to assign ACLs to single users?)
  
  also found this
  <https://civicrm.org/extensions/view-my-event-participants>
  which looks promising, but isn't quite ideal (yet) either. first off i'd need to hack something to change the event's creators (which usually isn't the trainer), and from a first test it seems that in CiviMail i only get access to single contacts (not groups).
  
  thanks for any hints,
  markus.
  
  **Tags:** civievent, civimail, acl, plugin
  
  > **Comments:**
  > **username_1**: It would respectful of the time folk in the community spend helping with questions such as yours if you would acknowledge their answer and hopefully accept it and give it a +1  
  > **username_2**: Pradeep's answer is good - but for 20 groups I might try the ACL role approach.  I've done the same for comparable numbers.  20 is right around the point I'd consider a custom extension like Pradeep's offering.  Also - I've worked with Pradeep, and he does very good work!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-01-20. Score: 0 | Accepted answer
  
  You will need to create an extension and use acl where clause hook to restrict view/edit operation for a contact.
  
  > **Comments:**
  > **username_0**: Thanks Pradeep, the way you say it it sounds super easy - do you have any hints on how to do it, possibly with some examples (just found civix in the docs, but this still looks a bit abstract to me as i'm not a real profound coder).  
  > **username_3**: 1. Create an extension using civix. 2. Use aclWhereClause hook  to give access list of contacts to logged in user. All the documentation are provided under aclWhereClause hook  
  > **username_3**: https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_aclWhereClause/.  If you are willing to sponsor i can have an extension develop for you to perform above permissioning. Can reach me at pradpnayak at gmail dot com  
  > **username_0**: i might get back to your offer, just gotta rethink our requirements with the possibilities of a custom solution - there could be a more useful way to do it for us as well as others.. and well, i'd need to check with our budget.. thanks, markus.  
  
  ---
  
  