Skip to main content

GROWING AND SUSTAINING RELATIONSHIPS

GROWING AND SUSTAINING RELATIONSHIPS
Close
Chandra Sekhar Putchakayala

End-User

Organization using CiviCRM

http://vidyahelpline.org

1. To maintain a track of all the workshops conducted till date, who attended the program, who funded the program etc.,
2. To regularly keep in touch with all key stakeholders

GROWING AND SUSTAINING RELATIONSHIPS
Close
Sandra Mayers

Implementor, Developer

Unitarian Universalist Church of Lancaster

http://www.uuclonline.org

Contact management, email marketing/management and web site integration.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Kelley Graham

Implementator End User

Green Geeks

http://green-geeks.com

Civi is the best! All my non-profit and community outreach activities are well supported by the platform. I love to help others benefit.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Mathieu Lutfy

Developer

bidon.ca

http://www.bidon.ca

The CiviCRM community is a great place for support, to exchange ideas and to contribute back. Working with other developers or users has often allowed me to pool our resources together and lower our costs, while ensuring better quality since there were more people using it.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Oliver Gibson

Consultant, Implementor, Trainer

Northbridge Digital

http://www.northbridgedigital.co.uk/

The community provides excellent forum support, new ideas and feedback on suggestions. The CiviCRM software suits many use cases and allows us to support a large number of diverse UK voluntary sector organisations.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Andrew Perry

Implementor, Developer, Integrator

Community Builders Australia

http://www.communitybuilders.com.au

CiviCRM enables us and our clients to invest precious funds into configuring the CRM to meet organisational needs, and building innovative new features, rather than paying annual license fees. With access to the source code and tight integration with leading website content management systems, CiviCRM is extremely flexible.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Erik Hommel

Implementer, Developer

EE-atWork

http://www.ee-atwork.nl

CiviCRM helps the organizations we support to do what they have to do! At EE-atWork we assist our customers with implementing and using CiviCRM. This includes functional support, training, project management, data migration, integration using the API and customization. We are based in The Netherlands.

Our customers are mainly non-profits, varying from larger organizations continuously improving the way CiviCRM supports them to smaller organizations using the core functionality and perhaps contributing to a Make It Happen. We have been active in the CiviCRM community since 2009. CiviCRM is all about community, sharing and producing together. We truly believe that one and one can be three!

GROWING AND SUSTAINING RELATIONSHIPS
Close
Rachel Daniell

end-user, implementor

consulting/multi

CiviCRM provides a vital tool whereby nonprofits and other social projects can implement strong contact-relationship management capabilities without high monthly fees. It also provides the integration and customization capabilities necessary to make such software useful in the complex, lived reality of doing social engagement work. Plus it continues to build the open source toolset made available to the Commons and grow the common good.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Graham Mitchell

Implementor, Administrator, end-user, Trainer

MC3

http://mc3.coop

I've been working with CiviCRM since 2006 or thereabouts. The community is outstanding in providing support and sharing expertise, which combines with a strong product to enable me in turn to deliver better results for the organisations that I work with. I only hope that over time I will be able to repay the debt by supporting other newcomers to CiviCRM.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Simon West

End-user, Administrator, Implementor

ZING

http://zing.uk.com

We feel there are too many obstacles facing not-for-profits (NFPs) considering commercial CRM offerings, including many of those that are charity oriented. From licensing models which restrict the fluid expansion of an organisation's user base (why should you be punished with higher costs for being successful?), to support from commercial companies being inherently tied to one supplier; a NFP would benefit from the option to 'shop around' for those most appropriate, e.g. based on: proximity and availability on-site, cost, experience, value added services... They also often lack the capacity for charity relevant workflows, necessitating either customisations, complicated and inefficient workarounds or an en-masse call for new functionality, as individual charities do not appear to carry the weight required to influence subtle NFP-only changes to market leading software, without large expense.

On the flip side, CiviCRM is completely free and open-source, carrying with it a friendly, hard-working and enthusiastic community of developers and implementers, constantly listening to the users' needs and sculpting future releases to the requirements of NFP organisations. This is exciting!

GROWING AND SUSTAINING RELATIONSHIPS
Close
Sarah Gladstone

Implementor, Developer

Pogstone, Inc.

http://pogstone.com

I have been involved in the CiviCRM community for over 5 years, and enjoy implementing and programming CiviCRM for a variety of non-profits. I have been amazed at the rapid pace of innovation delivered with each new release, and CiviCRM's flexibility in being able to accommodate a variety of requirements. I have learned a lot about CiviCRM by participating in CiviCon, online forums, and CiviCRM book sprint.

GROWING AND SUSTAINING RELATIONSHIPS
Close
Lisa Hubbert

94110

Creative Arts Charter School, SFArtsED

http://www.sfartsedsummer.org

Online donations, class registration, school tour registration, online enrollment applications, volunteer hour tracking, organization directories

LOGIN | REGISTER
  • Create new account
  • Request new password

Search form

  • BLOG
  • DEMO
  • Find An Expert
  • NEED HELP
  • SUPPORT US
  • DEVELOPER RESOURCES
CiviCRM Community Site logo CiviCRM Community Site
  • WHAT IS CIVICRM
    • Community
    • Case Studies
    • Experts
    • Contributors
    • Core Team
    • Licensing
    • Contact Us
  • WILL CIVICRM MEET YOUR NEEDS?
    • Contacts
    • Contributions
    • Communications
    • Peer-To-Peer Fundraisers
    • Advocacy Campaigns
    • Events
    • Members
    • Reports
    • Case Management
  • GET STARTED
    • Evaluate Your CRM Needs
    • Evaluate CiviCRM Features
    • Read Books
    • Contact an Ambassador
    • Demo CiviCRM
    • Download CiviCRM
    • Download Extensions
    • Find An Expert
  • PARTICIPATE
    • Join the community
    • Make it happen
    • Support CiviCRM
    • Meet ups
    • Document CiviCRM
    • Translate CiviCRM
    • Developer resources

You are here

Home » Blogs » rajesh's blog

Blog

  • API
  • Architecture Series
  • CiviCampaign
  • CiviCase
  • CiviCon
  • CiviContribute
  • CiviCRM
  • CiviCRM v4.1
  • CiviEvent
  • CiviMail
  • CiviMember
  • CiviMobile
  • CiviPledge
  • CiviReport
  • Documentation
  • Drupal
  • Extensions
  • Finance and Accounting
  • Interface Design and Layout Standards
  • Internationalization and Localization
  • Joomla
  • Make it happen
  • Marketing and Promotion
  • Meetups
  • Older Versions
  • Release
  • Schools
  • Solutions (case studies and user stories)
  • Sprints
  • Teams
  • Training
  • v1.6
  • v1.7
  • v1.8
  • v1.9
  • v2.0
  • v2.1
  • v2.2
  • v2.3
  • v3.0
  • v3.1
  • v3.2
  • v3.3
  • v3.4 and v4.0
  • v4.2
  • v4.3
  • WordPress

Wordpress Access Control

Submitted by rajesh on October 4, 2012 - 02:06

WordPress is the most popular content management systems in the world and CiviCRM is the most popular open source CRM for non-profits and the civic sector. With CiviCRM 4.1 support for Wordpress, Wordpress users were able to use the most powerful CMS + CRM combination ever.      

But Wordpress lacks the fine grained access control feature, which are very well supported in Drupal and Joomla. In CiviCRM 4.1/4.2 If you want a wordpress user to access CiviCRM, you should give them administrator role, which will allow them to not only access all the CiviCRM Components, but also the administrative pages.    

To overcome this drawback in Wordpress + CiviCRM, Access Control feature (similar to permissions in Drupal) was developed for Wordpress and integrated into CiviCRM core and will be in CiviCRM 4.3 release. This feature is developed as CiviCRM Core and independent of any wordpress plugins (unless you want to create new WP roles). When CiviCRM plugin is activated, all the CiviCRM core/component permissions are injected as wordpress capabilities, so that each WP roles can be assigned different capabilities. By default, Administrator role will have all capabilities (permissions) in CiviCRM and all other roles can be assigned capabilities (permissions) in CiviCRM Navigation Menu >> Administer >> Users and Permissions >> Permissions (Access Control)

One other drawback in Wordpress is that Wordpress does not deal with Anonymous users, which makes it hard for administrators to manage access to public event/contribution pages in Wordpress/CiviCRM installation. To overcome this, CiviCRM injects a new role (Anonymous User) in the wordpress instance, so that this role can be used to assign capabilities for anonymous users accessing public event/contribution pages.

 

Wordpress Access Control - Administrative Screen

 

Administrator sets permissions for 'Event Manager' Role

 

'Event Manager' user logged into CiviCRM

 

  • rajesh's blog
  • Log in or register to post comments

Comments

4.3 Release Date

Permalink Submitted by guyiac on October 4, 2012 - 11:55

Does anyone know an estmated release date for version 4.3?

 

BTW, this is fabulous that this is being addressed. thank you so much!

  • Log in or register to post comments

4.3 release date?

Permalink Submitted by lobo on October 4, 2012 - 12:08

 

I suspect we'll hit code freeze / alpha by end of novemeber or so. 4.3 will be out early next year

  • Log in or register to post comments

4.3 Release Date

Permalink Submitted by guyiac on October 16, 2012 - 07:03

Thanks Lobo!

  • Log in or register to post comments

Directory Listings

Permalink Submitted by jmdziba on October 5, 2012 - 08:33

Does this mean 4.3 will now enable us to post CiviCRM directory listings to the Wordpress front-end?  I believe when I asked about this capability before, the limitation cited was the lack of Access control (or something like that) in Wordpress?

  • Log in or register to post comments

Wordpress user permissions

Permalink Submitted by Gavin on November 8, 2012 - 10:14

Can you use the built in Wordpress capabilities to provide a more granular access control? You can add capabilities to a role, so for example when the plugin is installed call wp_civicrm_capability:

// setup capabilities when the plugin is first activated
register_activation_hook(__FILE__, 'wp_civicrm_capability');

instead of the way it is currently called by using an add_action('init', ...

This has the advantage that the capabilities are set ONE time at install and can then be subsequently modified.
Then in wp_civicrm_capability you can add a bunch of custom capabilities to the built in roles of admin, super admin like so:

//access civicrm page menu link to particular roles
$roles = array('super_admin', 'administrator', 'editor');
  foreach ($roles as $role) {
    $wp_roles->add_cap($role, 'civicrm_access_civicrm');
    ...
    if ($role != 'editor') {
     $wp_roles->add_cap($role, 'civicrm_administer_civicrm');
      ...
    }
  }

Then when you build out the access control page in CiviCRM you will expose just the civicrm_... capabilities against the current WordPress roles.

You could also check the permissions of the current user by modifying the check() function in wordpress.php something like this:

  /**
   * given a permission string, check for access requirements
   *
   * @param string $str the permission to check
   *
   * @return boolean true if yes, else false
   * @static
   * @access public
   */
  static
  function check($str) {
    // for administrators give them all permissions
    if (!function_exists('current_user_can')) {
      return TRUE;
    }
    $cap = 'civicrm_'.strtolower(str_replace(' ', '_', $str));
    if (current_user_can($cap)) {
    return TRUE;
    }

  • Log in or register to post comments

Inbuilt Wordpress Capabilities Used Currently

Permalink Submitted by rajesh on November 9, 2012 - 02:17

Hi Gavin

We already use the inbuilt wordpress capabilities to manage the access control. The below code is used to inject the minimum capabilities for all wordpress roles and also to create a new role 'Anonuymous user' with miminum capabilities to access online events/contribution/profile pages, when civicrm hook is activated.

 

register_activation_hook( __FILE__, 'civicrm_activate');

function civicrm_activate() {
    // Assign minimum capabilities for all wordpress roles and create anonymous_user' role
    civicrm_wp_set_capabilities();
}

/*
* Function to create anonymous_user' role, if 'anonymous_user' role is not in the wordpress installation     
* and assign minimum capabilities for all wordpress roles
*/
function civicrm_wp_set_capabilities() {
    global $wp_roles;
    if (!isset($wp_roles)) {
      $wp_roles = new WP_Roles();
    }
 
    //Minimum capabilities (Civicrm permissions) arrays
    $min_capabilities =  array(
      'make_online_contributions' => 1,
      'profile_create' => 1,
      'profile_edit' => 1,
      'profile_view' => 1,
      'register_for_events' => 1,
      'view_event_info' => 1,
    );
 
    // Assign the Minimum capabilities (Civicrm permissions) to all WP roles
    foreach ( $wp_roles->role_names as $role => $name ) {
      $roleObj = $wp_roles->get_role($role);
      foreach ($min_capabilities as $capability_name => $capability_value) {
        $roleObj->add_cap($capability_name);
      }
    }
 
    //Add the 'anonymous_user' role with minimum capabilities.
    if (!in_array('anonymous_user' , $wp_roles->roles)) {
      add_role(
        'anonymous_user',
        'Anonymous User',
        $min_capabilities
      );
    }
}

And the capabilities/permissions are checked for the roles in the check function as below

 /**
   * given a permission string, check for access requirements
   *
   * @param string $str the permission to check
   *
   * @return boolean true if yes, else false
   * @static
   * @access public
   */
 public static function check($str) {
    // for administrators give them all permissions
    if (!function_exists('current_user_can')) {
      return TRUE;
    }

    if (current_user_can('super admin') || current_user_can('administrator')) {
      return TRUE;
    }

    // Make string lowercase and convert spaces into underscore
    $str = strtolower($str);
    $str = str_replace(" ","_",$str);

    if ( is_user_logged_in() ) {
      // Check whether the logged in user has the capabilitity
      if (current_user_can($str)) {
        return TRUE;
      }
    }
    else {
      //check the capabilities of Anonymous user)
      $roleObj = new WP_Roles();
      if ($roleObj->get_role('anonymous_user') != NULL && array_key_exists($str, $roleObj->get_role('anonymous_user')->capabilities)) {
        return TRUE;
      }
    }
    return FALSE;
  }

Please review the functions and let me know if i am doing anything wrong.
 

  • Log in or register to post comments

CIVICRM


GROWING AND SUSTAINING RELATIONSHIPS

WHAT IS CIVICRM
  • Community
  • Case Studies
  • Experts
  • Contributors
  • Core Team
  • Licensing
  • Contact Us
WILL CIVICRM MEET YOUR NEEDS?
  • Contacts
  • Contributions
  • Communications
  • Peer-To-Peer Fundraisers
  • Advocacy Campaigns
  • Events
  • Members
  • Reports
  • Case Management
GET STARTED
  • Evaluate Your CRM Needs
  • Evaluate CiviCRM Features
  • Read Books
  • Contact an Ambassador
  • Demo CiviCRM
  • Download CiviCRM
  • Download Extensions
  • Find An Expert
PARTICIPATE
  • Join the CiviCRM Community
  • Read Our Blog
  • Community Forum
  • Attend a Training or Meetup
  • Make It Happen
  • Become A CiviCRM Developer
  • Issue Tracker
  • Help with Documentation
  • Translate