Skip to content

Commit

Permalink
Merge branch 'develop' into feature/DDS-72-add-sensor-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetAdmiralButter authored Mar 14, 2024
2 parents d02a992 + b2a0765 commit 35def8f
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 21 deletions.
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"drupal/clamav": "2.0.2-rc1",
"drupal/config_ignore": "^2.4",
"drupal/config_perms": "2.x-dev@dev",
"drupal/config_split": "^1.9",
"drupal/config_split": "^2.0",
"drupal/config_update": "^2.0@alpha",
"drupal/core": "10.1.4",
"drupal/core-recommended": "10.1.4",
"drupal/core": "10.1.7",
"drupal/core-recommended": "10.1.7",
"drupal/ckeditor_templates": "dev-feature/d10-compatible-with-ck5-support",
"drupal/ctools": "^3.14",
"drupal/diff": "^1.1",
Expand Down Expand Up @@ -76,7 +76,7 @@
"lesstif/php-jira-rest-client": "2.6.0",
"drupal/jira_rest": "^4.0@beta",
"drupal/ckeditor5_embedded_content": "1.0.1",
"respect/validation": "dev-master",
"respect/validation": "2.3.1",
"giggsey/libphonenumber-for-php": "^8.13",
"drupal/site_alert": "^1.3",
"lcobucci/clock": "3.0.0"
Expand Down Expand Up @@ -252,7 +252,8 @@
"Dropbutton RHS highlight covers adjacent text - https://www.drupal.org/project/paragraphs/issues/3350747#comment-14986371": "https://www.drupal.org/files/issues/2023-03-28/paragraph-dropdown-button-obscure-text-2.patch"
},
"drupal/content_lock": {
"Altering timeout message - https://www.drupal.org/project/content_lock/issues/3214877#comment-14108752": "https://www.drupal.org/files/issues/2021-05-20/content_lock_3214877_3.patch"
"Altering timeout message - https://www.drupal.org/project/content_lock/issues/3214877#comment-14108752": "https://www.drupal.org/files/issues/2021-05-20/content_lock_3214877_3.patch",
"Fix PHP 8.2+ deprecation notices - https://www.drupal.org/project/content_lock/issues/3343964#comment-15061454": "https://www.drupal.org/files/issues/2023-05-22/3343964-5.patch"
},
"lesstif/php-jira-rest-client": {
"Supports email lookup": "https://patch-diff.githubusercontent.com/raw/dpc-sdp/php-jira-rest-client/pull/1.diff"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ dependencies:
config:
- field.field.paragraph.accordion.field_paragraph_accordion
- field.field.paragraph.accordion.field_paragraph_accordion_style
- field.field.paragraph.accordion.field_paragraph_body
- field.field.paragraph.accordion.field_paragraph_title
- paragraphs.paragraphs_type.accordion
module:
- content_moderation
- paragraphs
- text
id: paragraph.accordion.default
targetEntityType: paragraph
bundle: accordion
Expand All @@ -17,36 +18,49 @@ content:
field_paragraph_accordion:
type: paragraphs
weight: 3
region: content
settings:
title: 'Accordion items'
title_plural: 'Accordion content'
edit_mode: closed
closed_mode: preview
autocollapse: all
closed_mode_threshold: 0
add_mode: button
form_display_mode: default
default_paragraph_type: accordion_content
default_paragraph_count: 1
features:
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
region: content
field_paragraph_accordion_style:
type: options_buttons
weight: 2
region: content
settings: { }
third_party_settings: { }
type: options_buttons
region: content
field_paragraph_title:
field_paragraph_body:
type: text_textarea
weight: 1
region: content
settings:
size: 60
rows: 5
placeholder: ''
third_party_settings: { }
field_paragraph_title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 0
settings: { }
region: content
settings: { }
third_party_settings: { }
hidden:
created: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,40 @@ dependencies:
config:
- field.field.paragraph.accordion.field_paragraph_accordion
- field.field.paragraph.accordion.field_paragraph_accordion_style
- field.field.paragraph.accordion.field_paragraph_body
- field.field.paragraph.accordion.field_paragraph_title
- paragraphs.paragraphs_type.accordion
module:
- entity_reference_revisions
- text
id: paragraph.accordion.default
targetEntityType: paragraph
bundle: accordion
mode: default
content:
field_paragraph_accordion:
type: entity_reference_revisions_entity_view
weight: 1
label: hidden
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 1
region: content
field_paragraph_body:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 2
region: content
field_paragraph_title:
weight: 0
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
type: string
weight: 0
region: content
hidden:
field_paragraph_accordion_style: true
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- core.entity_view_mode.paragraph.preview
- field.field.paragraph.accordion.field_paragraph_accordion
- field.field.paragraph.accordion.field_paragraph_accordion_style
- field.field.paragraph.accordion.field_paragraph_body
- field.field.paragraph.accordion.field_paragraph_title
- paragraphs.paragraphs_type.accordion
module:
Expand All @@ -17,24 +18,25 @@ mode: preview
content:
field_paragraph_accordion:
type: paragraph_summary
weight: 2
label: inline
settings: { }
third_party_settings: { }
weight: 2
region: content
field_paragraph_accordion_style:
type: list_default
weight: 1
region: content
label: inline
settings: { }
third_party_settings: { }
weight: 1
region: content
field_paragraph_title:
type: string
weight: 0
region: content
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
hidden: { }
weight: 0
region: content
hidden:
field_paragraph_body: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_paragraph_body
- paragraphs.paragraphs_type.accordion
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
allowed_formats: { }
id: paragraph.accordion.field_paragraph_body
field_name: field_paragraph_body
entity_type: paragraph
bundle: accordion
label: 'Accordion description'
description: 'Add accordion description to display below accordion title.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
allowed_formats: { }
field_type: text_long
6 changes: 6 additions & 0 deletions tests/behat/features/access.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ Feature: Access permissions
Given I am logged in as a user with the "Site Auditor" role
When I go to "/admin/reports/audit-trail"
Then I should get a 200 HTTP response

@api
Scenario: Approver role should not have access to redirects.
Given I am logged in as a user with the "approver" role
When I go to "admin/structure/taxonomy/add"
Then I should get a 404 HTTP response
50 changes: 50 additions & 0 deletions tide_core.install
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,53 @@ function tide_core_update_10002() {
$approver->grantPermission('tide node bulk update');
$approver->save();
}

/**
* Add description field to accordion.
*/
function tide_core_update_10003() {
module_load_include('inc', 'tide_core', 'includes/helpers');
$configs = [
'field.field.paragraph.accordion.field_paragraph_body' => 'field_config',
];
$config_location = [\Drupal::service('extension.list.module')->getPath('tide_core') . '/config/install'];
// Check if field already exported to config/sync.
foreach ($configs as $config => $type) {
$config_read = _tide_read_config($config, $config_location, TRUE);
$storage = \Drupal::entityTypeManager()->getStorage($type);
$id = substr($config, strrpos($config, '.') + 1);
if ($storage->load($id) == NULL) {
$config_entity = $storage->createFromStorageRecord($config_read);
$config_entity->save();
}
}

$form_configs = [
'core.entity_form_display.paragraph.accordion.default',
'core.entity_view_display.paragraph.accordion.default',
'core.entity_view_display.paragraph.accordion.preview',
];
foreach ($form_configs as $form_config) {
$config = \Drupal::configFactory()->getEditable($form_config);
$config_read = _tide_read_config($form_config, $config_location, FALSE);
$config->set('dependencies', $config_read['dependencies']);
$config->set('content', $config_read['content']);
$config->set('hidden', $config_read['hidden']);
$config->save();
}
}

/**
* Approver should not have access to administer taxonomy.
*/
function tide_core_update_10004() {
$role = 'approver';
$permissions = [
'administer taxonomy',
'edit terms in topic',
'delete terms in topic',
];
if ($role) {
user_role_revoke_permissions($role, $permissions);
}
}

0 comments on commit 35def8f

Please sign in to comment.