-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbaywatch.install
More file actions
81 lines (72 loc) · 2.2 KB
/
baywatch.install
File metadata and controls
81 lines (72 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/**
* @file
* Install file for SDP Platform Drupal Modules.
*/
use Drupal\baywatch\BaywatchOperation;
/**
* Implements hook_install().
*/
function baywatch_install() {
if (\Drupal::service('module_handler')->moduleExists('bay')) {
\Drupal::service('module_installer')->uninstall(['bay']);
}
$baywatch = new BaywatchOperation();
$baywatch->import_sdpa_password_policy();
$baywatch->enable_queue_mail();
$baywatch->cleanup_tables();
$baywatch->import_authenticated_content_key();
$baywatch->enable_config_split();
$baywatch->enable_preview();
$baywatch->enable_share_links();
$baywatch->remove_previewer_role();
$baywatch->remove_purge_lateruntime();
$baywatch->remove_authenticated_content();
$baywatch->enable_tide_edit_protection();
$baywatch->enable_tide_dashboard();
$baywatch->enable_tide_paragraphs_enhanced_modal();
$baywatch->set_default_timezone();
$baywatch->exclude_files_path();
$baywatch->import_default_csp_config();
$baywatch->enable_autologout();
$baywatch->enable_session_reminder();
$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_site_theming();
}
/**
* Update seckit HSTS max age to 31536000 if SecKit is enabled.
*/
function baywatch_update_10001() {
$config_storage = \Drupal::service('config.storage.sync');
if (!\Drupal::moduleHandler()->moduleExists('seckit')) {
return;
}
if (!$config_storage->exists('seckit.settings')) {
return;
}
// Load and update the config.
$config_data = $config_storage->read('seckit.settings');
if (isset($config_data['seckit_ssl']['hsts_max_age'])) {
$config_data['seckit_ssl']['hsts_max_age'] = 31536000;
$config_storage->write('seckit.settings', $config_data);
}
}
/**
* Enable session_reminder module.
*/
function baywatch_update_10002() {
$baywatch = new BaywatchOperation();
$baywatch->enable_session_reminder();
}
/**
* Uninstall jwt module.
*/
function baywatch_update_10003() {
if (\Drupal::service('module_handler')->moduleExists('jwt')) {
\Drupal::service('module_installer')->uninstall(['jwt']);
}
}