X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fprofiles%2Fdemo_umami%2Fdemo_umami.install;h=37025e0826840a23ff81be443afedb74cf05d21f;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=c26be61407416c52382a617a500dd630993cc20b;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/profiles/demo_umami/demo_umami.install b/web/core/profiles/demo_umami/demo_umami.install index c26be6140..37025e082 100644 --- a/web/core/profiles/demo_umami/demo_umami.install +++ b/web/core/profiles/demo_umami/demo_umami.install @@ -6,7 +6,6 @@ */ use Drupal\user\Entity\User; -use Drupal\user\RoleInterface; use Drupal\shortcut\Entity\Shortcut; /** @@ -35,13 +34,6 @@ function demo_umami_requirements($phase) { * @see system_install() */ function demo_umami_install() { - // Set front page to "node". - \Drupal::configFactory()->getEditable('system.site')->set('page.front', '/node')->save(TRUE); - - // Allow visitor account creation with administrative approval. - $user_settings = \Drupal::configFactory()->getEditable('user.settings'); - $user_settings->set('register', USER_REGISTER_ADMINISTRATORS_ONLY)->save(TRUE); - // Assign user 1 the "administrator" role. $user = User::load(1); $user->roles[] = 'administrator'; @@ -51,17 +43,6 @@ function demo_umami_install() { // menu links are valid. \Drupal::service('router.builder')->rebuildIfNeeded(); - // Enable the Contact link in the footer menu. - /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager */ - $menu_link_manager = \Drupal::service('plugin.manager.menu.link'); - $menu_link_manager->updateDefinition('contact.site_page', ['enabled' => TRUE]); - - user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['access site-wide contact form']); - user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access site-wide contact form']); - - // Allow authenticated users to use shortcuts. - user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access shortcuts']); - // Populate the default shortcut set. $shortcut = Shortcut::create([ 'shortcut_set' => 'default', @@ -79,13 +60,6 @@ function demo_umami_install() { ]); $shortcut->save(); - // Allow all users to use search. - user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['search content']); - user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['search content']); - - // Enable the admin theme. - \Drupal::configFactory()->getEditable('node.settings')->set('use_admin_theme', TRUE)->save(TRUE); - // Enable the demo content module. This can't be specified as a dependency // in the demo_umami.info.yml file, as it requires configuration provided by // the profile (fields etc.).