diff --git a/docker/.env.template b/docker/.env.template index 16f47a19dd..abb1412673 100644 --- a/docker/.env.template +++ b/docker/.env.template @@ -50,21 +50,16 @@ SENTRY_ENV="local" # drupal + ckan roles ROLES_CKAN_ADMIN=ckan_admin -ROLES_EDITOR=editor ROLES_PUBLISHER=publisher # initial users -USERS_0_USER=test-editor -USERS_0_PASS=test-editor -USERS_0_EMAIL=editor@localhost -USERS_0_ROLES="ckan_admin editor" -USERS_1_USER=test-publisher -USERS_1_PASS=test-publisher -USERS_1_EMAIL=publisher@localhost -USERS_1_ROLES="publisher" -USERS_2_USER=test-user -USERS_2_PASS=test-user -USERS_2_EMAIL=user@localhost +USERS_0_USER=test-publisher +USERS_0_PASS=test-publisher +USERS_0_EMAIL=publisher@localhost +USERS_0_ROLES="publisher" +USERS_1_USER=test-user +USERS_1_PASS=test-user +USERS_1_EMAIL=user@localhost # postgres DB_CKAN_HOST=postgres diff --git a/drupal/scripts/init_drupal.sh b/drupal/scripts/init_drupal.sh index ca454c7155..f2101f0fce 100644 --- a/drupal/scripts/init_drupal.sh +++ b/drupal/scripts/init_drupal.sh @@ -60,6 +60,35 @@ drush language:default -y "fi" # enable base theme drush theme:enable -y bootstrap +# remove some configurations +# NOTE: ansible role skips errors with this condition: +# result.rc == 1 and 'Config {{ item }} does not exist' not in result.stderr +echo "delete configurations.." +drush config:delete easy_breadcrumb.settings || true +drush config:delete node.type.page || true +drush config:delete core.entity_form_display.node.page.default || true +drush config:delete core.entity_view_display.node.page.default || true +drush config:delete pathauto.settings || true +drush config:delete captcha.captcha_point.contact_message_feedback_form || true +drush config:delete core.base_field_override.node.article.promote || true +drush config:delete editor.editor.full_html || true +drush config:delete block.block.avoindata_collapsiblesearch || true +drush config:delete block.block.avoindata_infobox || true +drush config:delete disqus.settings || true +drush config:delete field.field.node.avoindata_guide_page.field_guide_comments || true +drush config:delete field.field.node.avoindata_article.field_article_comments || true +drush config:delete field.field.node.avoindata_event.field_event_comments || true +drush config:delete field.storage.node.field_article_comments || true +drush config:delete field.storage.node.field_basic_page_comments || true +drush config:delete field.storage.node.field_event_comments || true +drush config:delete field.storage.node.field_guide_comments || true +drush config:delete core.entity_view_display.node.page.search_index || true +drush config:delete core.entity_view_display.node.page.search_result || true +drush config:delete core.entity_view_display.node.page.teaser || true +drush config:delete field.field.node.page.field_basic_page_comments || true +drush config:delete field.storage.node.field_basic_page_comments || true +drush config:delete user.role.editor || true + # uninstall modules echo "uninstall modules.." diff --git a/drupal/site_config/user.role.administrator.yml b/drupal/site_config/user.role.administrator.yml index 70e0ebb0ca..10084dfb6d 100644 --- a/drupal/site_config/user.role.administrator.yml +++ b/drupal/site_config/user.role.administrator.yml @@ -5,118 +5,4 @@ id: administrator label: administrator weight: 2 is_admin: true -permissions: - - 'access administration pages' - - 'access all views' - - 'access comments' - - 'access content' - - 'access content overview' - - 'access contextual links' - - 'access dashboard' - - 'access draggableviews' - - 'access overlay' - - 'access rules debug' - - 'access site in maintenance mode' - - 'access site reports' - - 'access toolbar' - - 'access user profiles' - - 'administer CAPTCHA settings' - - 'administer actions' - - 'administer blocks' - - 'administer ckeditor' - - 'administer comment blocks' - - 'administer comments' - - 'administer content translations' - - 'administer content types' - - 'administer custom username validation' - - 'administer features' - - 'administer fields' - - 'administer filters' - - 'administer honeypot' - - 'administer image styles' - - 'administer imce' - - 'administer languages' - - 'administer menu' - - 'administer modules' - - 'administer node expire' - - 'administer nodes' - - 'administer pathauto' - - 'administer permissions' - - 'administer recaptcha' - - 'administer rules' - - 'administer search' - - 'administer services' - - 'administer sharethis' - - 'administer shortcuts' - - 'administer site configuration' - - 'administer software updates' - - 'administer taxonomy' - - 'administer themes' - - 'administer url aliases' - - 'administer users' - - 'administer uuid' - - 'administer views' - - 'administer xmlsitemap' - - 'block IP addresses' - - 'bypass honeypot protection' - - 'bypass node access' - - 'bypass rules access' - - 'cancel account' - - 'change own username' - - 'create article content' - - 'create page content' - - 'create url aliases' - - 'customize ckeditor' - - 'customize shortcut links' - - 'delete any article content' - - 'delete any page content' - - 'delete own article content' - - 'delete own page content' - - 'delete revisions' - - 'delete terms in 1' - - 'display admin pages in another language' - - 'edit any article content' - - 'edit any page content' - - 'edit node expire' - - 'edit own article content' - - 'edit own comments' - - 'edit own page content' - - 'edit terms in 1' - - 'export nodes' - - 'export own nodes' - - 'generate features' - - 'get a system variable' - - 'get any binary files' - - 'get own binary files' - - 'import or export menu' - - 'manage features' - - 'notify of path changes' - - 'opt-in or out of tracking' - - 'override custom username validation' - - 'perform unlimited index queries' - - 'post comments' - - 'rename features' - - 'revert revisions' - - 'save file information' - - 'search content' - - 'select account cancellation method' - - 'services menu retrieve menu' - - 'set a system variable' - - 'skip CAPTCHA' - - 'skip comment approval' - - 'switch shortcut sets' - - 'translate admin strings' - - 'translate blocks' - - 'translate content' - - 'translate interface' - - 'translate user-defined strings' - - 'use PHP for tracking visibility' - - 'use PHP to import nodes' - - 'use advanced search' - - 'use all enabled languages' - - 'use ctools import' - - 'use text format filtered_html' - - 'use text format full_html' - - 'view own unpublished content' - - 'view revisions' - - 'view the administration theme' +permissions: {} diff --git a/drupal/site_config/user.role.anonymous.yml b/drupal/site_config/user.role.anonymous.yml index e959639e37..09309091a7 100644 --- a/drupal/site_config/user.role.anonymous.yml +++ b/drupal/site_config/user.role.anonymous.yml @@ -9,6 +9,4 @@ permissions: - 'access comments' - 'access content' - 'access site-wide contact form' - - 'search content' - - 'services menu retrieve menu' - - 'use text format filtered_html' + diff --git a/drupal/site_config/user.role.authenticated.yml b/drupal/site_config/user.role.authenticated.yml index a813bda593..f6400d243d 100644 --- a/drupal/site_config/user.role.authenticated.yml +++ b/drupal/site_config/user.role.authenticated.yml @@ -13,6 +13,4 @@ permissions: - 'access content' - 'access site-wide contact form' - 'post comments' - - 'search content' - 'skip comment approval' - - 'use text format filtered_html' diff --git a/drupal/site_config/user.role.editor.yml b/drupal/site_config/user.role.editor.yml deleted file mode 100644 index de216d5cbc..0000000000 --- a/drupal/site_config/user.role.editor.yml +++ /dev/null @@ -1,57 +0,0 @@ -langcode: en -status: true -dependencies: { } -id: editor -label: editor -weight: 3 -is_admin: null -permissions: - - 'access comments' - - 'access content overview' - - 'access draggableviews' - - 'access toolbar' - - 'administer comments' - - 'administer menu' - - 'administer nodes' - - 'administer url aliases' - - 'bypass protected submissions validation' - - 'create article content' - - 'create event content' - - 'create page content' - - 'create service_alert content' - - 'create tutorial content' - - 'create url aliases' - - 'customize shortcut links' - - 'delete any article content' - - 'delete any event content' - - 'delete any page content' - - 'delete any service_alert content' - - 'delete any tutorial content' - - 'delete own article content' - - 'delete own event content' - - 'delete own page content' - - 'delete own service_alert content' - - 'delete own tutorial content' - - 'delete revisions' - - 'edit any article content' - - 'edit any event content' - - 'edit any page content' - - 'edit any service_alert content' - - 'edit any tutorial content' - - 'edit own article content' - - 'edit own comments' - - 'edit own event content' - - 'edit own page content' - - 'edit own service_alert content' - - 'edit own tutorial content' - - 'post comments' - - 'revert revisions' - - 'search content' - - 'translate content' - - 'translate interface' - - 'translate user-defined strings' - - 'use text format filtered_html' - - 'use text format full_html' - - 'use text format ckeditor5' - - 'view own unpublished content' - - 'view revisions' diff --git a/drupal/site_config/user.role.publisher.yml b/drupal/site_config/user.role.publisher.yml index 839248091e..a83e122cb1 100644 --- a/drupal/site_config/user.role.publisher.yml +++ b/drupal/site_config/user.role.publisher.yml @@ -9,7 +9,6 @@ permissions: - 'access administration pages' - 'access comments' - 'access content overview' - - 'access draggableviews' - 'access shortcuts' - 'access taxonomy overview' - 'access toolbar' @@ -26,17 +25,13 @@ permissions: - 'administer url aliases' - 'administer user display' - 'administer user form display' - - 'bypass protected submissions validation' - 'create avoindata_article content' - 'create avoindata_event content' - 'create avoindata_guide_page content' - 'create avoindata_servicemessage content' - 'create content translations' - - 'create event content' - 'create page content' - - 'create service_alert content' - 'create terms in tags' - - 'create tutorial content' - 'create url aliases' - 'customize shortcut links' - 'delete any article content' @@ -44,53 +39,35 @@ permissions: - 'delete any avoindata_event content' - 'delete any avoindata_guide_page content' - 'delete any avoindata_servicemessage content' - - 'delete any event content' - 'delete any page content' - - 'delete any service_alert content' - - 'delete any tutorial content' - 'delete content translations' - 'delete own article content' - 'delete own avoindata_article content' - 'delete own avoindata_event content' - 'delete own avoindata_guide_page content' - 'delete own avoindata_servicemessage content' - - 'delete own event content' - 'delete own page content' - - 'delete own service_alert content' - - 'delete own tutorial content' - - 'delete revisions' - 'delete terms in tags' - 'edit any article content' - 'edit any avoindata_article content' - 'edit any avoindata_event content' - 'edit any avoindata_guide_page content' - 'edit any avoindata_servicemessage content' - - 'edit any event content' - 'edit any page content' - - 'edit any service_alert content' - - 'edit any tutorial content' - 'edit own article content' - 'edit own avoindata_article content' - 'edit own avoindata_event content' - 'edit own avoindata_guide_page content' - 'edit own avoindata_servicemessage content' - 'edit own comments' - - 'edit own event content' - 'edit own page content' - - 'edit own service_alert content' - - 'edit own tutorial content' - 'edit terms in tags' - 'post comments' - - 'revert revisions' - - 'search content' - 'translate avoindata_guide_page node' - - 'translate content' - 'translate interface' - 'translate page node' - - 'translate user-defined strings' - 'update content translations' - 'use text format basic_html' - - 'use text format filtered_html' - 'use text format full_html' - 'use text format ckeditor5' - 'use text format restricted_html' @@ -107,5 +84,4 @@ permissions: - 'view own unpublished content' - 'view page revisions' - 'view page unpublished content' - - 'view revisions' - 'view the administration theme'