Skip to content

Commit

Permalink
Merge pull request #222 from davidferlay/testeruser
Browse files Browse the repository at this point in the history
Adding Tester default user and updated permissions of contributor role
  • Loading branch information
David Ferlay authored Feb 28, 2020
2 parents f1678d9 + bca4af5 commit 064c3f4
Show file tree
Hide file tree
Showing 20 changed files with 949 additions and 51 deletions.
3 changes: 2 additions & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ THEME_NAME=NA
SITE_NAME=Example
[email protected]
ADMIN_NAME=admin
ADMIN_PW=admin
[email protected]
ADMIN_PW=admin
TESTER_PW=tester
PROJECT_INSTALL=
IMAGE_PHP=skilldlabs/php:73-fpm
IMAGE_NGINX=skilldlabs/nginx:1.16
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ endif
$(call php, composer drupal-scaffold)
$(call php, composer create-required-files)

TESTER_NAME = Tester
## Install drupal
si:
@echo "Installing from: $(PROJECT_INSTALL)"
Expand All @@ -91,6 +92,8 @@ endif
ifneq ($(strip $(MODULES)),)
$(call php, drush en $(MODULES) -y)
$(call php, drush pmu $(MODULES) -y)
$(call php, drush user:password "$(TESTER_NAME)" "$(TESTER_PW)")

endif

## Import online & local translations
Expand All @@ -108,7 +111,8 @@ info:
$(eval CONTAINERS = $(shell docker ps -f name=$(COMPOSE_PROJECT_NAME) --format "{{ .ID }}" -f 'label=traefik.enable=true'))
$(foreach CONTAINER, $(CONTAINERS),$(info http://$(shell printf '%-19s \n' $(shell docker inspect --format='{{(index .NetworkSettings.Networks "$(COMPOSE_NET_NAME)").IPAddress}}:{{index .Config.Labels "traefik.port"}} {{range $$p, $$conf := .NetworkSettings.Ports}}{{$$p}}{{end}} {{.Name}}' $(CONTAINER) | rev | sed "s/pct\//,pct:/g" | sed "s/,//" | rev | awk '{ print $0}')) ))
@echo "$(RESULT)"
@echo "UID1 - Login : \"$(ADMIN_NAME)\" - Password : \"$(ADMIN_PW)\""
@echo "Admin - Login : \"$(ADMIN_NAME)\" - Password : \"$(ADMIN_PW)\""
@echo "Contributor - Login : \"$(TESTER_NAME)\" - Password : \"$(TESTER_PW)\""

## Run shell in PHP container as regular user
exec:
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,16 @@
"Split Authored by and Authored on in Display Settings": "https://www.drupal.org/files/issues/2019-12-05/1399990-108-reroll.patch",
"Translated field denormalization creates duplicate values": "https://www.drupal.org/files/issues/2019-07-02/2904423-core_8_8-72.patch",
"Fix multilingual site's layout edit context issue": "https://www.drupal.org/files/issues/2019-12-19/3101231-19.patch",
"SQLite database locking errors cause fatal errors": "https://www.drupal.org/files/issues/1120020-59.patch"
"SQLite database locking errors cause fatal errors": "https://www.drupal.org/files/issues/1120020-59.patch",
"Error: Call to a member function getLabel() after enabling layout_builder": "https://www.drupal.org/files/issues/2019-11-14/2985882-entityfield-43.patch",
"Split Interface Translation permission": "https://www.drupal.org/files/issues/2020-01-14/locale-administer-locale-permission-3067056-7.patch"
},
"drush/drush": {
"Import multiple custom translation po files": "https://patch-diff.githubusercontent.com/raw/drush-ops/drush/pull/4251.patch"
},
"drupal/lb_ux": {
"Bloc edition when Show content preview is disabled": "https://www.drupal.org/files/issues/2020-02-27/3116402.patch"
},
"drupal/config_inspector": {
"DrupalCoreLink could not be converted to string": "https://www.drupal.org/files/issues/2019-10-02/3084666-4.patch"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"name": [
{
"value": "default_content_author"
"value": "Default content author"
}
],
"mail": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"_links": {
"self": {
"href": "http:\/\/default\/user\/20?_format=hal_json"
},
"type": {
"href": "http:\/\/drupal.org\/rest\/type\/user\/user"
},
"http:\/\/drupal.org\/rest\/relation\/user\/user\/content_translation_uid": [
{
"href": "http:\/\/default\/en\/user\/2?_format=hal_json",
"lang": "en"
}
]
},
"uid": [
{
"value": 10
}
],
"uuid": [
{
"value": "96a20336-595d-4d97-8e1f-3e70db0101bd"
}
],
"langcode": [
{
"value": "en",
"lang": "en"
}
],
"preferred_langcode": [
{
"value": "en"
}
],
"preferred_admin_langcode": [
{
"value": "en"
}
],
"name": [
{
"value": "Tester"
}
],
"mail": [
{
"value": ""
}
],
"timezone": [
{
"value": "Europe\/Paris"
}
],
"status": [
{
"value": true
}
],
"created": [
{
"value": "2020-02-28T09:55:31+00:00",
"format": "Y-m-d\\TH:i:sP"
}
],
"changed": [
{
"value": "2020-02-28T09:55:44+00:00",
"lang": "en",
"format": "Y-m-d\\TH:i:sP"
}
],
"access": [
{
"value": "1970-01-01T00:00:00+00:00",
"format": "Y-m-d\\TH:i:sP"
}
],
"login": [
{
"value": "1970-01-01T00:00:00+00:00",
"format": "Y-m-d\\TH:i:sP"
}
],
"init": [
{
"value": ""
}
],
"roles": [
{
"target_id": "contributor"
}
],
"default_langcode": [
{
"value": true,
"lang": "en"
}
],
"path": [
{
"alias": null,
"pid": null,
"langcode": "en",
"lang": "en"
}
],
"content_translation_source": [
{
"value": "und",
"lang": "en"
}
],
"content_translation_outdated": [
{
"value": false,
"lang": "en"
}
],
"_embedded": {
"http:\/\/drupal.org\/rest\/relation\/user\/user\/content_translation_uid": [
{
"_links": {
"self": {
"href": "http:\/\/default\/en\/user\/2?_format=hal_json"
},
"type": {
"href": "http:\/\/drupal.org\/rest\/type\/user\/user"
}
},
"uuid": [
{
"value": "4bad48eb-ff5b-45b4-b30c-ecabff09591a"
}
],
"lang": "en"
}
]
},
"content_translation_status": [
{
"value": true,
"lang": "en"
}
],
"content_translation_created": [
{
"value": "2020-02-28T09:55:31+00:00",
"lang": "en",
"format": "Y-m-d\\TH:i:sP"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
langcode: en
status: true
dependencies: { }
id: site_template_block
label: 'Site template block'
revision: 1
description: 'Block allowing to fill the site template with content'
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
langcode: en
status: true
dependencies:
config:
- block_content.type.site_template_block
- field.field.block_content.site_template_block.link
- field.field.block_content.site_template_block.media
- field.field.block_content.site_template_block.position
- field.field.block_content.site_template_block.title
module:
- field_layout
- layout_discovery
- link
- media_library
third_party_settings:
field_layout:
id: layout_onecol
settings:
label: ''
id: block_content.site_template_block.default
targetEntityType: block_content
bundle: site_template_block
mode: default
content:
info:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
langcode:
type: language_select
weight: 1
region: content
settings:
include_locked: true
third_party_settings: { }
link:
weight: 5
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
type: link_default
region: content
media:
type: media_library_widget
weight: 4
settings:
media_types: { }
third_party_settings: { }
region: content
position:
weight: 6
settings: { }
third_party_settings: { }
type: options_select
region: content
title:
weight: 3
settings:
size: 60
placeholder: ''
third_party_settings: { }
type: string_textfield
region: content
translation:
weight: 2
region: content
settings: { }
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
langcode: en
status: true
dependencies:
config:
- block_content.type.site_template_block
- field.field.block_content.site_template_block.link
- field.field.block_content.site_template_block.media
- field.field.block_content.site_template_block.position
- field.field.block_content.site_template_block.title
module:
- field_layout
- layout_discovery
- link
third_party_settings:
field_layout:
id: layout_onecol
settings:
label: ''
id: block_content.site_template_block.default
targetEntityType: block_content
bundle: site_template_block
mode: default
content:
link:
weight: 2
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
type: link
region: content
media:
type: entity_reference_entity_view
weight: 1
label: hidden
settings:
view_mode: full
link: false
third_party_settings: { }
region: content
title:
weight: 0
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
type: string
region: content
hidden:
langcode: true
position: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
config:
- block_content.type.site_template_block
- field.storage.block_content.link
module:
- link
id: block_content.site_template_block.link
field_name: link
entity_type: block_content
bundle: site_template_block
label: Link
description: 'Action link the user is called to click'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
link_type: 17
title: 1
field_type: link
Loading

0 comments on commit 064c3f4

Please sign in to comment.