How do to deal with permissions and CRM field sets...?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
yautja_cetanu's picture

This is a specific use case we're facing:

Our student worker Alan has created an "Individual" party. This individual is a member of the congregation. Using fields he was able to add the ability to store the individual's name, e-mail, phone number, what "serving area" they were interested in and if they wanted to join a "grow group". Grow groups are mid-week bible study groups. The plan is to have a laptop open on sunday so people could fill out all this information themselves directly on the computer, they would also be able to fill this information out themselves if they signed up on the site.

However, once they have said that they would like to join a grow group they are assigned one by someone else (call them a "manager" maybe). This is a drop-down field as there are a select number of potential grow groups. Once they have been assigned a grow group this information is publically available for everyone to see, its just only managers can change them.


So what is this?

Currently we're making "grow group" and "individual information" as 2 seperate profile2s. As Profile2s are seperate entities we can easily set the permissions on each one and assign them to certain roles. However I feel that this is diverging a bit from the purpose of profile2 and it becomes an interface that is ok for site builders, but now much more complicated for an end-user like Alan to do himself.

I realise that in this case grow groups ought to probably be some kind of entity or group in their own right. But I think this case represents well the use case of wanting to create information that has permissions that are different to other information on the same page.

  • I have been thinking about genus or hat. But really this isn't something solved by them either? In this use case everyone has a congregation member hat. Here they also have the "Individual" party type. So assigning permissions based on hats or party types won't automatically solve this (although maybe in the create hat ui there might be nice ways around it).
  • Do we make a generic permissions fields module where every field could have different permissions? I think there might be scope for drupal doing this but I think that would not be a nice way to solve this particular issue as I could imagine it being quite unweldy for large CRM databases.
  • Site builders could easily deal with this. Do we just make it so we don't expect end-users to be able to add their own fields? Kind of feel this takes away from some of the awesomeness of even trellon's CRM now.
  • Maybe we could keep everything as they are but create a nicer UI for dealing with permissions? Contextual links?
  • What about making something like "profile access types"? I could assign a profile to be "public" or "private" and site builders to set up what particular types there are and then how permissions interact with those types. Something feels dodgy about this to me, can't pinpoint what but its kind of inspired by drupal's roles.
  • Do we want to use profile2s to handle these things. Would it be more ideal to have a more generic "field sets" module that presented these groups to profiles2 and then built a UI for easily adding them
  • We could use our tab interface. Say that different tabs have different permissions and just decide to not cater for this case.

I'm still uncomfortable with how we (me and rob) are suggesting to use profile2. It feels like we're moving away from using profile2 in the way it is intended, but I don't know for sure why I think this.

Any ideas?

Comments

What about using Organic Groups for Groups?

awasson's picture

Maybe I'm missing the point and I am no expert with OG but I have been dabbling with the OG module and the first thing that came to mind when I started reading this post was OG. I see nothing wrong with using Profile2 in a way that it wasn't conceived as long as it doesn't overcomplicate things and gest the job done but your need is to manage groups and that is sort of what OG was designed for.

Hello Awasson, This post is

yautja_cetanu's picture

Hello Awasson,

This post is not really about groups. Its about having different sets of data that will be handled differently by drupal. For example on the CRB form of a teacher there may be some areas where you want the teacher to be able edit it, whereas there are some areas where you want an office admin to edit the data (but also let the teacher see there data). While there are some fields you probably don't want the teacher to even see.

We have ideas about groups.

Our idea of groups is more similar to CiviCRM smartgroups or possible a graph. We're thinking we'll do it entirely with relations. So for example rather then "grouping" by company. We make 2 entities in our system. Individual and Company and then have them all relating to each other. So if you want see everyone employed by a particular company you'll have a dynamic search for "All individuals who have the relation "employed by" the company "Barclays". For example.

This means we could have loads of differeny dynamic groups with lots of different rules.

My thoughts are once we have our dynamic groups we build something (such as by using rules) that automatically puts members of our "smartgroups" into OG for sites that use OG. But our CRM wouldn't require it.

field_permissions?

zeezhao's picture

Hi. Checking to see how this was resolved.

Sounds like you need field_permissions module but with a simple interface to manage/group the fields. When you have many fields and roles, the defualt drupal permissions screens become unwieldy and infact run out of memory (at least in D6)...

CRM API

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week