function features_access_override_actions in Features 6
Same name and namespace in other branches
- 7.2 features.module \features_access_override_actions()
- 7 features.module \features_access_override_actions()
Menu access callback for whether a user should be able to access override actions for a given feature.
1 string reference to 'features_access_override_actions'
- features_menu in ./
features.module - Implementation of hook_menu().
File
- ./
features.module, line 643 - Module file for the features module, which enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together statisfy a certain use-case.
Code
function features_access_override_actions($feature) {
if (user_access('administer features')) {
static $access = array();
if (!isset($access[$feature->name])) {
// Set a value first. We may get called again from within features_detect_overrides().
$access[$feature->name] = FALSE;
features_include();
module_load_include('inc', 'features', 'features.export');
$access[$feature->name] = in_array(features_get_storage($feature->name), array(
FEATURES_OVERRIDDEN,
FEATURES_NEEDS_REVIEW,
)) && user_access('administer features');
}
return $access[$feature->name];
}
return FALSE;
}