updated features : created showroom_localisation field. Perms with showroom role are still failing

This commit is contained in:
Bachir Soussi Chiadmi
2016-11-21 19:39:50 +01:00
parent 039f49aded
commit 091c01ce81
21 changed files with 843 additions and 170 deletions

View File

@@ -64,6 +64,96 @@ function showroom_field_default_field_bases() {
'type' => 'taxonomy_term_reference',
);
// Exported field_base: 'field_showroom_localisation'.
$field_bases['field_showroom_localisation'] = array(
'active' => 1,
'cardinality' => -1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_showroom_localisation',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'revision_id' => array(
0 => 'revision_id',
),
'value' => array(
0 => 'value',
),
),
'locked' => 0,
'module' => 'field_collection',
'settings' => array(
'entity_translation_sync' => FALSE,
'hide_blank_items' => 1,
'hide_initial_item' => 0,
'path' => '',
'profile2_private' => FALSE,
),
'translatable' => 0,
'type' => 'field_collection',
);
// Exported field_base: 'field_showroom_localisation_loca'.
$field_bases['field_showroom_localisation_loca'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_showroom_localisation_loca',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(
'entity_translation_sync' => FALSE,
'max_length' => 255,
'profile2_private' => FALSE,
),
'translatable' => 0,
'type' => 'text',
);
// Exported field_base: 'field_showroom_localisation_show'.
$field_bases['field_showroom_localisation_show'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_showroom_localisation_show',
'field_permissions' => array(
'type' => 2,
),
'indexes' => array(
'tid' => array(
0 => 'tid',
),
),
'locked' => 0,
'module' => 'taxonomy',
'settings' => array(
'allowed_values' => array(
0 => array(
'vocabulary' => 'showroom',
'parent' => 0,
'depth' => '',
),
),
'entity_translation_sync' => FALSE,
'options_list_callback' => 'content_taxonomy_allowed_values',
'profile2_private' => FALSE,
),
'translatable' => 0,
'type' => 'taxonomy_term_reference',
);
// Exported field_base: 'field_tode_showroom'.
$field_bases['field_tode_showroom'] = array(
'active' => 1,

View File

@@ -10,6 +10,175 @@
function showroom_field_default_field_instances() {
$field_instances = array();
// Exported field_instance:
// 'field_collection_item-field_showroom_localisation-field_showroom_localisation_loca'.
$field_instances['field_collection_item-field_showroom_localisation-field_showroom_localisation_loca'] = array(
'bundle' => 'field_showroom_localisation',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
),
'entity_type' => 'field_collection_item',
'field_name' => 'field_showroom_localisation_loca',
'label' => 'Localisation',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 32,
),
);
// Exported field_instance:
// 'field_collection_item-field_showroom_localisation-field_showroom_localisation_show'.
$field_instances['field_collection_item-field_showroom_localisation-field_showroom_localisation_show'] = array(
'bundle' => 'field_showroom_localisation',
'default_value' => NULL,
'deleted' => 0,
'description' => '[current-user:field-showroom:tid]',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'taxonomy',
'settings' => array(),
'type' => 'taxonomy_term_reference_plain',
'weight' => 0,
),
),
'entity_type' => 'field_collection_item',
'field_name' => 'field_showroom_localisation_show',
'label' => 'Showroom',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'taxonomy',
'settings' => array(
'autocomplete_path' => 'taxonomy/autocomplete',
'content_taxonomy_autocomplete_new_terms' => 'allow',
'display_empty' => 1,
'formatter' => 'taxonomy_term_reference_link',
'formatter_settings' => array(),
'size' => 60,
),
'type' => 'taxonomy_autocomplete',
'weight' => 31,
),
);
// Exported field_instance: 'node-materiau-field_showroom_localisation'.
$field_instances['node-materiau-field_showroom_localisation'] = array(
'bundle' => 'materiau',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'bookmark' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardbig' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardfull' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'cardmedium' => array(
'label' => 'above',
'module' => 'field_collection',
'settings' => array(
'add' => '',
'delete' => '',
'description' => 1,
'edit' => '',
'view_mode' => 'full',
),
'type' => 'field_collection_view',
'weight' => 9,
),
'cardsmall' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'default' => array(
'label' => 'above',
'module' => 'field_collection',
'settings' => array(
'add' => 'Ajouter',
'delete' => 'Supprimer',
'description' => TRUE,
'edit' => 'Modifier',
'view_mode' => 'full',
),
'type' => 'field_collection_view',
'weight' => 25,
),
'homeblock' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'print' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_showroom_localisation',
'label' => 'showroom_localisation',
'required' => 0,
'settings' => array(
'entity_translation_sync' => FALSE,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 0,
'module' => 'field_collection',
'settings' => array(),
'type' => 'field_collection_embed',
'weight' => 5,
),
);
// Exported field_instance: 'node-showroom-body'.
$field_instances['node-showroom-body'] = array(
'bundle' => 'showroom',
@@ -1100,10 +1269,13 @@ function showroom_field_default_field_instances() {
t('Body');
t('Description');
t('Email');
t('Localisation');
t('Mémo');
t('Nom');
t('Phone');
t('Showroom');
t('[current-user:field-showroom:tid]');
t('showroom_localisation');
return $field_instances;
}

View File

@@ -8,6 +8,9 @@
* Implements hook_ctools_plugin_api().
*/
function showroom_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "field_group" && $api == "field_group") {
return array("version" => "1");
}
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* @file
* showroom.features.menu_links.inc
*/
/**
* Implements hook_menu_default_menu_links().
*/
function showroom_menu_default_menu_links() {
$menu_links = array();
// Exported menu link: navigation_showroom:node/add/showroom.
$menu_links['navigation_showroom:node/add/showroom'] = array(
'menu_name' => 'navigation',
'link_path' => 'node/add/showroom',
'router_path' => 'node/add/showroom',
'link_title' => 'Showroom',
'options' => array(
'identifier' => 'navigation_showroom:node/add/showroom',
),
'module' => 'system',
'hidden' => 0,
'external' => 0,
'has_children' => 0,
'expanded' => 0,
'weight' => 0,
'customized' => 0,
'language' => 'und',
'menu_links_customized' => 0,
);
// Translatables
// Included for use with string extractors like potx.
t('Showroom');
return $menu_links;
}

View File

@@ -30,6 +30,24 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'create field_showroom_localisation'.
$permissions['create field_showroom_localisation'] = array(
'name' => 'create field_showroom_localisation',
'roles' => array(
'Showroom' => 'Showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'create field_showroom_localisation_show'.
$permissions['create field_showroom_localisation_show'] = array(
'name' => 'create field_showroom_localisation_show',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'create field_tode_showroom'.
$permissions['create field_tode_showroom'] = array(
'name' => 'create field_tode_showroom',
@@ -80,6 +98,15 @@ function showroom_user_default_permissions() {
'module' => 'taxonomy',
);
// Exported permission: 'delete users with role 13'.
$permissions['delete users with role 13'] = array(
'name' => 'delete users with role 13',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'administerusersbyrole',
);
// Exported permission: 'edit any showroom content'.
$permissions['edit any showroom content'] = array(
'name' => 'edit any showroom content',
@@ -100,6 +127,23 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit field_showroom_localisation'.
$permissions['edit field_showroom_localisation'] = array(
'name' => 'edit field_showroom_localisation',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_showroom_localisation_show'.
$permissions['edit field_showroom_localisation_show'] = array(
'name' => 'edit field_showroom_localisation_show',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'edit field_tode_showroom'.
$permissions['edit field_tode_showroom'] = array(
'name' => 'edit field_tode_showroom',
@@ -120,6 +164,23 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_showroom_localisation'.
$permissions['edit own field_showroom_localisation'] = array(
'name' => 'edit own field_showroom_localisation',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_showroom_localisation_show'.
$permissions['edit own field_showroom_localisation_show'] = array(
'name' => 'edit own field_showroom_localisation_show',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'edit own field_tode_showroom'.
$permissions['edit own field_tode_showroom'] = array(
'name' => 'edit own field_tode_showroom',
@@ -150,6 +211,15 @@ function showroom_user_default_permissions() {
'module' => 'taxonomy',
);
// Exported permission: 'edit users with role 13'.
$permissions['edit users with role 13'] = array(
'name' => 'edit users with role 13',
'roles' => array(
'administrator' => 'administrator',
),
'module' => 'administerusersbyrole',
);
// Exported permission: 'enter showroom revision log entry'.
$permissions['enter showroom revision log entry'] = array(
'name' => 'enter showroom revision log entry',
@@ -237,13 +307,32 @@ function showroom_user_default_permissions() {
$permissions['view field_showroom'] = array(
'name' => 'view field_showroom',
'roles' => array(
'Showroom' => 'Showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_showroom_localisation'.
$permissions['view field_showroom_localisation'] = array(
'name' => 'view field_showroom_localisation',
'roles' => array(
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_showroom_localisation_show'.
$permissions['view field_showroom_localisation_show'] = array(
'name' => 'view field_showroom_localisation_show',
'roles' => array(
'anonymous user' => 'anonymous user',
'authenticated user' => 'authenticated user',
),
'module' => 'field_permissions',
);
// Exported permission: 'view field_tode_showroom'.
$permissions['view field_tode_showroom'] = array(
'name' => 'view field_tode_showroom',
@@ -264,6 +353,24 @@ function showroom_user_default_permissions() {
'module' => 'field_permissions',
);
// Exported permission: 'view own field_showroom_localisation'.
$permissions['view own field_showroom_localisation'] = array(
'name' => 'view own field_showroom_localisation',
'roles' => array(
'Showroom' => 'Showroom',
'administrator' => 'administrator',
'root' => 'root',
),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_showroom_localisation_show'.
$permissions['view own field_showroom_localisation_show'] = array(
'name' => 'view own field_showroom_localisation_show',
'roles' => array(),
'module' => 'field_permissions',
);
// Exported permission: 'view own field_tode_showroom'.
$permissions['view own field_tode_showroom'] = array(
'name' => 'view own field_tode_showroom',

View File

@@ -0,0 +1,79 @@
<?php
/**
* @file
* showroom.field_group.inc
*/
/**
* Implements hook_field_group_info().
*/
function showroom_field_group_info() {
$field_groups = array();
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_showroom|node|materiau|form';
$field_group->group_name = 'group_showroom';
$field_group->entity_type = 'node';
$field_group->bundle = 'materiau';
$field_group->mode = 'form';
$field_group->parent_name = 'group_htabs';
$field_group->data = array(
'label' => 'Showroom',
'weight' => '17',
'children' => array(
0 => 'field_localisation',
1 => 'field_showroom_localisation',
),
'format_type' => 'htab',
'format_settings' => array(
'formatter' => 'closed',
'instance_settings' => array(
'description' => '',
'classes' => 'group-showroom field-group-htab',
'required_fields' => 1,
),
),
);
$field_groups['group_showroom|node|materiau|form'] = $field_group;
$field_group = new stdClass();
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
$field_group->api_version = 1;
$field_group->identifier = 'group_side6|node|materiau|cardmedium';
$field_group->group_name = 'group_side6';
$field_group->entity_type = 'node';
$field_group->bundle = 'materiau';
$field_group->mode = 'cardmedium';
$field_group->parent_name = '';
$field_group->data = array(
'label' => 'side 6',
'weight' => '6',
'children' => array(
0 => 'field_showroom_localisation',
),
'format_type' => 'div',
'format_settings' => array(
'label' => 'side 6',
'instance_settings' => array(
'id' => '',
'classes' => 'side group-side6 field-group-div',
'description' => '',
'show_label' => '0',
'label_element' => 'h3',
'effect' => 'none',
'speed' => 'fast',
),
'formatter' => 'open',
),
);
$field_groups['group_side6|node|materiau|cardmedium'] = $field_group;
// Translatables
// Included for use with string extractors like potx.
t('Showroom');
t('side 6');
return $field_groups;
}

View File

@@ -7,10 +7,15 @@ dependencies[] = cck_phone
dependencies[] = ctools
dependencies[] = email
dependencies[] = features
dependencies[] = field_collection
dependencies[] = field_group
dependencies[] = field_permissions
dependencies[] = materio_content_types
dependencies[] = materio_page_title
dependencies[] = materio_showroom
dependencies[] = materio_subscriptions
dependencies[] = materio_user_profiles
dependencies[] = menu
dependencies[] = metatag
dependencies[] = node
dependencies[] = options
@@ -22,11 +27,20 @@ dependencies[] = taxonomy
dependencies[] = term_merge
dependencies[] = text
dependencies[] = tode
features[ctools][] = field_group:field_group:1
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = description_field
features[field_base][] = field_showroom
features[field_base][] = field_showroom_localisation
features[field_base][] = field_showroom_localisation_loca
features[field_base][] = field_showroom_localisation_show
features[field_base][] = field_tode_showroom
features[field_group][] = group_showroom|node|materiau|form
features[field_group][] = group_side6|node|materiau|cardmedium
features[field_instance][] = field_collection_item-field_showroom_localisation-field_showroom_localisation_loca
features[field_instance][] = field_collection_item-field_showroom_localisation-field_showroom_localisation_show
features[field_instance][] = node-materiau-field_showroom_localisation
features[field_instance][] = node-showroom-body
features[field_instance][] = node-showroom-field_memo
features[field_instance][] = node-showroom-field_public_address
@@ -36,23 +50,32 @@ features[field_instance][] = node-showroom-field_tode_showroom
features[field_instance][] = taxonomy_term-showroom-description_field
features[field_instance][] = taxonomy_term-showroom-name_field
features[field_instance][] = user-user-field_showroom
features[menu_links][] = navigation_showroom:node/add/showroom
features[node][] = showroom
features[rules_config][] = rules_auto_tag_news_with_showroom
features[taxonomy][] = showroom
features[user_permission][] = assign Showroom role
features[user_permission][] = create field_showroom
features[user_permission][] = create field_showroom_localisation
features[user_permission][] = create field_showroom_localisation_show
features[user_permission][] = create field_tode_showroom
features[user_permission][] = create showroom content
features[user_permission][] = delete any showroom content
features[user_permission][] = delete own showroom content
features[user_permission][] = delete terms in showroom
features[user_permission][] = delete users with role 13
features[user_permission][] = edit any showroom content
features[user_permission][] = edit field_showroom
features[user_permission][] = edit field_showroom_localisation
features[user_permission][] = edit field_showroom_localisation_show
features[user_permission][] = edit field_tode_showroom
features[user_permission][] = edit own field_showroom
features[user_permission][] = edit own field_showroom_localisation
features[user_permission][] = edit own field_showroom_localisation_show
features[user_permission][] = edit own field_tode_showroom
features[user_permission][] = edit own showroom content
features[user_permission][] = edit terms in showroom
features[user_permission][] = edit users with role 13
features[user_permission][] = enter showroom revision log entry
features[user_permission][] = merge showroom terms
features[user_permission][] = override showroom authored by option
@@ -63,8 +86,12 @@ features[user_permission][] = override showroom revision option
features[user_permission][] = override showroom sticky option
features[user_permission][] = show showroom title
features[user_permission][] = view field_showroom
features[user_permission][] = view field_showroom_localisation
features[user_permission][] = view field_showroom_localisation_show
features[user_permission][] = view field_tode_showroom
features[user_permission][] = view own field_showroom
features[user_permission][] = view own field_showroom_localisation
features[user_permission][] = view own field_showroom_localisation_show
features[user_permission][] = view own field_tode_showroom
features[user_role][] = Showroom
features[variable][] = additional_settings__active_tab_showroom
@@ -79,6 +106,7 @@ features[variable][] = diff_show_preview_changes_node_showroom
features[variable][] = diff_view_mode_preview_node_showroom
features[variable][] = entity_translation_hide_translation_links_showroom
features[variable][] = entity_translation_node_metadata_showroom
features[variable][] = field_bundle_settings_field_collection_item__field_showroom_localisation
features[variable][] = field_bundle_settings_node__showroom
features[variable][] = i18n_node_extended_showroom
features[variable][] = i18n_node_options_showroom

View File

@@ -98,6 +98,36 @@ return t($items[0][\'name\']);
$strongarm->value = '0';
$export['entity_translation_node_metadata_showroom'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'field_bundle_settings_field_collection_item__field_showroom_localisation';
$strongarm->value = array(
'view_modes' => array(
'full' => array(
'custom_settings' => FALSE,
),
'diff_standard' => array(
'custom_settings' => FALSE,
),
'print' => array(
'custom_settings' => FALSE,
),
'token' => array(
'custom_settings' => FALSE,
),
),
'extra_fields' => array(
'form' => array(
'redirect' => array(
'weight' => '30',
),
),
'display' => array(),
),
);
$export['field_bundle_settings_field_collection_item__field_showroom_localisation'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;