Author Topic: Limit access to a membership page by current membership type?  (Read 602 times)

Offline mclyde

  • I post frequently
  • ***
  • Posts: 166
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
We currently have 2 membership pages;  we have a required membership in the organization and then optional memberships in "sections".
The organizational membership has several options: one year, 3 year and Lifetime.  We set up the second membership page for current members in the 3 year or Lifetime group to add an optional sectional membership. (so they did not accidently renew their 3 year or lifetime; yes despite warnings it did happen :-)

I would like to have the section only page accessible only to members who have 3 year or Lifetime memberships - is that possible through civi without serious coding?   would it be any easier to extract info using php to display the different urls to the different signup pages from a membership overview page? 

we're using price sets on both, so if access to a price set could be limited by membership types that would also do the trick and actually allow us to go back to one page

Thanks in advance!
Merlise
 
Merlise Clyde

Offline Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3581
  • Karma: 134
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly Drupal
Re: Limit access to a membership page by current membership type?
« Reply #1 on: April 26, 2012, 03:04:54 am »
I would like to have the section only page accessible only to members who have 3 year or Lifetime memberships - is that possible through civi without serious coding?

I don't think so.

would it be any easier to extract info using php to display the different urls to the different signup pages from a membership overview page? 

Might be a bit easier but it doesn't actually protect the other pages. But for a non-secure, low-tech solution, that would work. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

Offline NASACT

  • I post frequently
  • ***
  • Posts: 278
  • Karma: 6
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Limit access to a membership page by current membership type?
« Reply #2 on: April 26, 2012, 11:10:52 am »
I guess a work around would be that those are membership types and then you can use ACL to control access based on current rather then trying to complicate things.  Just my thoughts on this.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Offline mclyde

  • I post frequently
  • ***
  • Posts: 166
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Limit access to a membership page by current membership type?
« Reply #3 on: April 27, 2012, 08:34:08 am »
NASCT - would you elaborate?   I was not aware that you could use ACL  to limit access to specific  contribution pages in civi. 

So I would create an ACL role based on  everyone with a Lifetime membership (but that is a dynamic smart group, not a static group) so civi ACL doesn't seem to be able to access the group. 

and then I could create a rule that allows only them to access  a contribution page with a specific id ???   I don;t see where that is an option ?

thanks,
Merlise

Merlise Clyde

Offline NASACT

  • I post frequently
  • ***
  • Posts: 278
  • Karma: 6
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Limit access to a membership page by current membership type?
« Reply #4 on: May 01, 2012, 01:14:24 pm »
Sorry for the confusion, I don't think you can limit access to membership pages but I know Pete said there was a way to limit membership renewal to those already with a specific membership type. But I digress.  I thought you were referring to content within the site and using ACL for current members or those with a particular tag, say 3 years is a new tag and then smart group then assign ACL based on smart group.  Sorry again for the confusion.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!

Offline Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 3581
  • Karma: 134
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly Drupal
Re: Limit access to a membership page by current membership type?
« Reply #5 on: May 02, 2012, 05:07:17 am »
I would like to have the section only page accessible only to members who have 3 year or Lifetime memberships - is that possible through civi without serious coding? 

It depends on what "serious coding" means. :)

It's actually not hard at all to code this as a Drupal module.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

Offline mclyde

  • I post frequently
  • ***
  • Posts: 166
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Limit access to a membership page by current membership type?
« Reply #6 on: May 02, 2012, 06:35:44 am »
Hmm I still cannot see where to allow a smart group to have a ACL role.  (I'm running 4.1.2 and D6)

On the Manage Groups: Group Settings page the only Group types available for smart groups are Mailing List.  (this is true for creating a new smart group)

For static groups the Group type access control is an option,

Under the  Administer -> User and Permissions -> Access Control page  I can only grant ACL Roles to the static groups. ( which is what the documentation for 4.1 indicates under limitations)   

 Is the smart group ACL a feature in 4.2?   Any chance a given contribution page could have access based on a civi  ACL? 
Merlise Clyde

Offline mclyde

  • I post frequently
  • ***
  • Posts: 166
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: Limit access to a membership page by current membership type?
« Reply #7 on: May 02, 2012, 06:48:44 am »
Hi Hershel,

writing a Drupal module is getting into serious programming for me as my php is pretty limited and I while I can understand basic code with the Drupal/Civi API starting from scratch is still daunting!

I am using member pricesets, so is it feasible to have a hook that limits a specific price field  in a specific price set to a given membertype?       That way I do not neeed to limit access to the page but just the membership options.     

best,
Merlise

Merlise Clyde

Offline NASACT

  • I post frequently
  • ***
  • Posts: 278
  • Karma: 6
    • National Association of State Auditors, Comptrollers and Treasurers
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.58 (ubuntu)
  • PHP version: 5.3.5
Re: Limit access to a membership page by current membership type?
« Reply #8 on: May 02, 2012, 06:53:28 am »
You have to turn on OG Sync in CiviCRM module on Drupal side, it's off by default.  Then you map an organic group (call it the same if you wish) to the CiviCRM Smart Group.  Not sure if there is any Cron you have to setup for the sync or not.
-AJ
My GChat - azon21@gmail.com -  This is where you can find me most days!