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 CiviMember (Moderator: Deepak Srivastava) »
  • Limit access to a membership page by current membership type?
Pages: [1]

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

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • 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
Limit access to a membership page by current membership type?
April 25, 2012, 09:36:54 pm
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

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Limit access to a membership page by current membership type?
April 26, 2012, 03:04:54 am
Quote from: mclyde on April 25, 2012, 09:36:54 pm
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.

Quote from: mclyde on April 25, 2012, 09:36:54 pm
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

See here for the official: What to do if you think you've found a bug.

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • 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?
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!

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • 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?
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

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • 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?
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!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Limit access to a membership page by current membership type?
May 02, 2012, 05:07:17 am
Quote from: mclyde on April 25, 2012, 09:36:54 pm
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

See here for the official: What to do if you think you've found a bug.

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • 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?
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

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • 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?
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

NASACT

  • I post frequently
  • ***
  • Posts: 289
  • Karma: 9
    • 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?
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!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Limit access to a membership page by current membership type?

This forum was archived on 2017-11-26.