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 CiviEvent (Moderator: Yashodha Chaku) »
  • Restrict events to group members?
Pages: [1]

Author Topic: Restrict events to group members?  (Read 2120 times)

SteveM

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 3
    • OpenConcept Consulting, Inc.
Restrict events to group members?
June 24, 2007, 04:01:32 pm
Hey all,

I've just been trying a few strategies to set up genuinely public vs. group-only events. I got close by using different profiles for registration and applying ACLs, but not close enough (ugly error messages; anonymous users can still see the event). Is anyone working on such a thing under the hood?

Off the top of my head, I thought I might hack something in like this: whenever an event is displayed or a registration request is made:
- see if any profiles are invoked for the event registration
- apply the ACL rules relevant to the profile for the current operation
- present a meaningful "access denied" message on failure

Or is there another way to do this that I've just missed?

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: Restrict events to group members?
June 24, 2007, 09:15:08 pm

i think the below might be a tenous hack :)

I think it might be better for you to just extend ACL's to also include events in addition to profiles and custom groups. That is a more scalable and less hacky solution (IMO). You can base ACL's for events similar to ACL's for profiles.

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

Jason W

  • I post frequently
  • ***
  • Posts: 197
  • Karma: 12
  • jason@civitrainingtutorials.com
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5.x.x
Re: Restrict events to group members?
November 13, 2012, 11:15:58 am
Hello SteveM,

I'm with Lobo. ACLs can do this pretty easily. For instance:

(With the appropraite CiviCRM permissions OFF in your CMS)
You could set up an ACL that allows Group A to view  and/or edit event A. You could set it up for group B to do the same with event B. if Group a = Public, and Group B = non Public.

Cheers,
Jason
civiTrainingTutorials
"Helping You Help Others"

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Restrict events to group members?

This forum was archived on 2017-11-26.