Answers.Body: <p>May be using ACLWhere clause hook can be achieved what you need</p>
  <p>or may be using <a href="https://civicrm.org/extensions/member-only-event" rel="nofollow noreferrer">https://civicrm.org/extensions/member-only-event</a> as an alternate approach</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-01T13:30:12.240Z
Answers.Text: Hi. Yes, I've looked at both of those options. The extension doesn't give me sufficiently fine-grained control. An ACL-based approach, maybe leveraging the hook you mention, could potentially do it, but I don't have the coding chops for that. Could you help?
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-01T13:10:14.733Z
Answers.LastActivityDate: 2024-05-01T13:15:18.397Z
Answers.LastEditDate: 2024-05-01T13:15:18.397Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I want to be able to offer events targeted to different groups of users. The documentation suggests that I can do this using CiviCRM ACLs, but that appears to only offer access control for a given event. My events are categorised by type – i have about 8 different event types set up, covering perhaps 100 events.</p>
  <p>Can I set up an ACL which gives access to all events of a given type, such that I can then add a further event and the access controls will apply based on the event type I select for the event?</p>
  <p>This seems like an obvious approach, but the UI suggests otherwise.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-01T23:01:02.563Z
Comments.Text: guessing not Drupal - otherwise webform + civigroup synch + drupal roles might be a solution for someone who is on Drupal and sees this
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><acl>
Title: How can I control access to events based on user role and event type?
ThreadText: # How can I control access to events based on user role and event type?
  
  (Asked by: username_0 on 2024-05-01)
  
  I want to be able to offer events targeted to different groups of users. The documentation suggests that I can do this using CiviCRM ACLs, but that appears to only offer access control for a given event. My events are categorised by type – i have about 8 different event types set up, covering perhaps 100 events.
  
  Can I set up an ACL which gives access to all events of a given type, such that I can then add a further event and the access controls will apply based on the event type I select for the event?
  
  This seems like an obvious approach, but the UI suggests otherwise.
  
  **Tags:** civievent, acl
  
  > **Comments:**
  > **username_1**: guessing not Drupal - otherwise webform + civigroup synch + drupal roles might be a solution for someone who is on Drupal and sees this  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-05-01. Score: 2
  
  May be using ACLWhere clause hook can be achieved what you need
  
  or may be using <https://civicrm.org/extensions/member-only-event> as an alternate approach
  
  > **Comments:**
  > **username_0**: Hi. Yes, I've looked at both of those options. The extension doesn't give me sufficiently fine-grained control. An ACL-based approach, maybe leveraging the hook you mention, could potentially do it, but I don't have the coding chops for that. Could you help?  
  
  ---
  
  