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 CiviContribute (Moderator: Donald Lobo) »
  • Permissions needed to edit recurring contribution
Pages: [1]

Author Topic: Permissions needed to edit recurring contribution  (Read 591 times)

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Permissions needed to edit recurring contribution
June 28, 2013, 08:53:43 am
What permissions are needed for a donor to edit their recurring contribution? The auto-renew Paypal receipt directs people to a link if they want to "update recurring contribution amount or change the number of installments", but this throws a "You do not have permissions to execute this url" error on our WP setup.

URL it's trying to access is:
civicrm/contribute/updaterecur&reset=1&crid=[recurringid]&cs=[checksum]

Cheers,

Andrew

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Permissions needed to edit recurring contribution
June 28, 2013, 10:53:37 am
Andrew - That URL "should" be accessible if user has 'make online contributions' permission. However I did some checking in the integration-specific code for WP and it looks like a PHP file may need to be modifed to allow access to that path.

So ... if your user already has 'make online contributions' permission, can you try this one-line patch to civicrm/WordPress/civicrm.php, and see if that fixes things:

Code: [Select]
diff --git a/civicrm.php b/civicrm.php
index 7367187..2e28ed3 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -487,7 +487,7 @@ function civicrm_check_permission($args) {
   if (in_array('CiviContribute', $config->enableComponents)) {
     if (
       $arg1 == 'contribute' &&
-      in_array($arg2, array('transact', 'campaign', 'pcp'))
+      in_array($arg2, array('transact', 'campaign', 'pcp', 'updaterecur'))
     ) {
       return TRUE;
     }
Protect your investment in CiviCRM by  becoming a Member!

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: Permissions needed to edit recurring contribution
June 28, 2013, 11:01:18 am
That worked! Thank you very much for checking that out so quickly.

I also added 'updatebilling' and 'unsubscribe' to handle the other two default links in the receipt.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Permissions needed to edit recurring contribution
June 28, 2013, 11:39:23 am
Excellent - thx for testing quickly. I'll get that patch committed for the next 4.3 release with the additional paths as you've noted. I guess you're the first WP site to start using the self-service recurring contribution change feature :-)

BTW - it looks like the BHA hasn't posted a case study for your WP / Civi site yet. Please pay it back by taking a few minutes to do so. The WordPress / Civi community is growing but folks need more examples to refer to.

http://civicrm.org/what/casestudies
Protect your investment in CiviCRM by  becoming a Member!

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: Permissions needed to edit recurring contribution
June 28, 2013, 11:42:55 am
Of course, yep - hadn't spotted those. Will certainly do so  :)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Permissions needed to edit recurring contribution
June 28, 2013, 11:56:57 am
Great. Fix for this bug committed for next release: http://issues.civicrm.org/jira/browse/CRM-12978
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Permissions needed to edit recurring contribution

This forum was archived on 2017-11-26.