Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable tide_ckeditor module #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
# baywatch

Configuration for integration with Bay hosting platform

## Features

- Ensures dependencies required for the bay hosting platform are installed.
- Allows configuring the default `Reply-To` email address via `SMTP_REPLYTO`
environment variable.
# Baywatch
Drupal configuration and deployment tooling for SDP specific features.
1 change: 1 addition & 0 deletions baywatch.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- smtp:smtp
- config_split:config_split
- jwt:jwt
- bay_platform_dependencies:bay_platform_dependencies
config_devel:
optional:
- password_policy.password_policy.password_policy_sdpa
Expand Down
28 changes: 28 additions & 0 deletions baywatch.install
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function baywatch_install() {
$baywatch->enable_coi();
$baywatch->enable_tide_content_collection();
$baywatch->enable_tide_logs();
$baywatch->enable_tide_site_alert();
$baywatch->enable_bay_platform_dependencies();
$baywatch->enable_tide_ckeditor();
}

/**
Expand Down Expand Up @@ -439,6 +442,7 @@ function baywatch_update_8022() {
$baywatch = new BaywatchOperation();
$baywatch->enable_tide_content_collection();
}

/**
* Enables Tide Logs module.
*/
Expand Down Expand Up @@ -560,3 +564,27 @@ function baywatch_update_8029() {
$seckit_config->save();
}
}

/**
* Enables Tide Site Alert module.
*/
function baywatch_update_8030() {
$baywatch = new BaywatchOperation();
$baywatch->enable_tide_site_alert();
}

/**
* Enables bay_platform_dependencies module.
*/
function baywatch_update_8031() {
$baywatch = new BaywatchOperation();
$baywatch->enable_bay_platform_dependencies();
}

/**
* Enable tide_ckeditor module for Ckeditor5 upgrade.
*/
function baywatch_update_8032() {
$baywatch = new BaywatchOperation();
$baywatch->enable_tide_ckeditor();
}
16 changes: 0 additions & 16 deletions baywatch.module
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,3 @@
* Procedural hooks for baywatch module.
*/

/**
* Implements hook_mail_alter().
*/
function baywatch_mail_alter(&$message) {
// Ensures that the Reply-To header points to a no-reply address if it is
// using the default value. This is to ensure the SES verified address
// doesn't get spammed. The second check ensures that modules which change
// the reply-to (such as webform) still function correctly.
//
// The SMTP_REPLYTO environment variable is set in lagoon.
$reply_to = getenv("SMTP_REPLYTO") ?: '';
if ($reply_to && ($message['from'] == $message['reply-to'])) {
$message['reply-to'] = $reply_to;
$message['headers']['Reply-to'] = $reply_to;
}
}
23 changes: 2 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,16 @@
"drupal/autologout": "^1.3",
"drush/drush": "^10.3",
"drupal/coi": "^3",
"drupal/purge": "3.3",
"drupal/purge_queuer_url": "^1.0@RC",
"drupal/section_purger": "dev-updates_to_compatible_with_drupal_9",
"drupal/redis": "^1.0",
"drupal/smtp": "^1.2",
"drupal/queue_mail": "^1",
"drupal/jwt": "^1.0",
"drupal/config_split": "^1.4",
"dpc-sdp/tide_logs": "1.0.0"
"dpc-sdp/bay_platform_dependencies": "^1.0"
},
"exclude": [
"drupal/section_purger"
],
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8",
"exclude": [
"drupal/section_purger"
]
},
"drupal/section_purger": {
"type": "git",
"url": "https://git.drupalcode.org/issue/section_purge-3227034.git"
},
"dpc-sdp/tide_logs": {
"type": "vcs",
"no-api": true,
"url": "https://github.com/dpc-sdp/tide_logs"
"url": "https://packages.drupal.org/8"
}
},
"minimum-stability": "dev",
Expand Down
13 changes: 0 additions & 13 deletions config/optional/key.key.section_io_password.yml

This file was deleted.

28 changes: 0 additions & 28 deletions config/optional/section_purger.settings.8714ff77fc.yml

This file was deleted.

15 changes: 14 additions & 1 deletion src/BaywatchOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,5 +408,18 @@ public function enable_tide_logs() {
$this->baywatch_install_module('tide_logs');
}

}
public function enable_tide_site_alert() {
// Enable tide_site_alert module.
$this->baywatch_install_module('tide_site_alert');
}

public function enable_bay_platform_dependencies() {
// Enable bay_platform_dependencies module.
$this->baywatch_install_module('bay_platform_dependencies');
}

public function enable_tide_ckeditor() {
$this->baywatch_install_module('tide_ckeditor');
}

}