One way to do it is by using field gropups and custom permissions.
Start by installing field groups module to make it possible to group your fields at all.
Move your fields into different control groups and use for example tab groups and tab items in a way to make the editing page pleasing.
If you want detailed asccess rights for different user groups, add some code to do this.
Add your own permissions by using hook_permissions()
For example
function my_module_permissions() {
return array(
'edit group1' => array(
'title' => t('Edit group1 section'),
'description' => t('Edit field group group1 in Building.'),
),
);
}
In a hook_form_alter() function, you can hide/show field groups like this:
// Check if the current user has rights to see this group and its fields
if(!user_access('edit group1', $user)) {
// Loop through all group fields and hide them
foreach($form['#groups']['group1']->children as $index => $groupField){
$form[$groupField]['#access'] = FALSE;
}
}
You don't have to hide the group itself, hideing all it's fields will render it invisible.
Then it's just a matter of settings the right permissions to the right user groups.
Pros:
- Detailed permissions just for the things you need
- Field groups are pleasing to use :-)
Cons: You need to do some coding
Second way
An other way is to use field collections module where a collection itself will be treated as fields in a sense. I guess by adding field permissions you will be able to control each fild collection's permissions.
Pros: no coding :-)
Cons:
- By adding field collection you adding a new layer of abstraction wich might complicate things for you later on.
- field collections isn't supported by all modules you might use - check it before starting this path.
- It will get a bit messy in the permissions hanlding page