In order to avoid conflicts between features I use, where possible, features_component_alter_hooks. For example, in Open Atrium, if I need to override the "administer users" permission (exported by Atrium feature) I would implement:
function MYFEATURE_user_default_permissions_alter(&$permissions) {
$permissions['administer users'] = array(
'name' => 'administer users',
'roles' => array(
'0' => 'administrator',
'1' => 'manager',
),
);
}
I was wondering if it wouldn't be possible, for the Features module, to automatically generate features_component_alter_hooks (in the same way it generates default_hooks) when a potential conflict is been detected.
If this would be the case the Atrium feature could be marked with another status, something "less" then "Overridden", like "Altered" or "Extended". Such a change could involve the UI too where the "alterable" component could be presented to the site builder in a different way, like:
administer users (alterable)
Does it make sense? If there is any interest I could spend some time on it.
Comments
Comment #1
ademarco commentedPushing up this issue after DrupalCon London BOF.
Comment #2
hefox commentedisn't that what features_overrides module does?
Comment #3
ademarco commentedRight, I had just promised people at the BOF to push up the issue for review.
Comment #4
hefox commentedYea this is features overrides, so closing this.
Comment #5
hefox commented