Closed mikejr83 closed 7 years ago
@mikejr83 I implement group <=> capability mapping by using BP Groups CiviCRM Sync and a couple of callbacks that apply capabilities when group membership changes. Indeed in many cases, BuddyPress group membership can behave exactly like capabilities. IIRC, wordpress.org used this (and perhaps still does) instead of built-in capabilities. BuddyPress would then provide your slick UI ;-)
Requirement
By defining a mapping, either through a UI construct or through a hook, the plugin should enable the mapping from a group within CiviCRM to a role or capability in WordPress.
Use Case / User Story
In this scenario image an organization where the election of officers occurs on some annual basis. After the elections are completed an administrator logs into the system, removes any contacts/individuals which are no longer officers, adds any contacts/individuals which are now officers, and then performs a sync.
Once a sync is triggered the plugin should apply the mapping in a many-to-one fashion instead of the current a one-to-one mapping.
Other Info
Ideally I would like some slick UI to handle group to role/capability mapping however some hook to do this would also be neat.