Skip to content

Commit

Permalink
[#678] Add protected_pages module
Browse files Browse the repository at this point in the history
  • Loading branch information
ericras committed May 9, 2024
1 parent 4c1c6de commit 4fbb180
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
"drupal/oembed_providers": "^2.1",
"drupal/paragraphs": "^1.8",
"drupal/pathauto": "^1.3",
"drupal/protected_pages": "^1.6",
"drupal/queue_ui": "^3.1",
"drupal/rabbit_hole": "^1.0@beta",
"drupal/redirect": "^1.5",
Expand Down
51 changes: 50 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ module:
page_cache: 0
path: 0
path_alias: 0
protected_pages: 0
queue_ui: 0
rabbit_hole: 0
redirect: 0
Expand Down
2 changes: 1 addition & 1 deletion config/sync/editor.editor.html_code.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
uuid: ef0e1aed-58c7-458d-b628-b5450e4ae112
uuid: 1875535d-5bc4-435a-a62e-b6f373b2df0f
langcode: en
status: true
dependencies:
Expand Down
26 changes: 26 additions & 0 deletions config/sync/protected_pages.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
_core:
default_config_hash: fcx2bfv-TfdQ_hGuvq4GkK3SAeANYibuVJMcEJBGG38
email:
subject: 'Please visit this new page'
body: |-
Dear friend,
I just created a new page on my website and wanted to invite you to visit. The page is protected by password. Please find the details below:-
Page Url = [protected-page-url]
Page Password = password here
Thank you.
[site-name]
password:
protected_pages_session_expire_time: '0'
per_page_or_global: per_page_or_global
others:
protected_pages_title: 'Protected Page -- Enter password'
protected_pages_description: 'The page you are trying to view is password protected. Please enter the password below to proceed.'
protected_pages_password_fieldset_legend: 'Enter password'
protected_pages_password_label: 'Enter password'
protected_pages_submit_button_text: Authenticate
protected_pages_incorrect_password_msg: 'An incorrect password was submitted. Please check your password and try again.'
langcode: en
6 changes: 3 additions & 3 deletions config/sync/unl_five.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ features:
node_user_picture: false
comment_user_picture: true
comment_user_verification: true
_core:
default_config_hash: RzrFjHolQT4-m--ddhSf6ZZ-CQsPcP1Ln3IvgHsWPxk
logo:
use_default: 1
favicon:
use_default: 1
use_default: 0
_core:
default_config_hash: RzrFjHolQT4-m--ddhSf6ZZ-CQsPcP1Ln3IvgHsWPxk
6 changes: 6 additions & 0 deletions config/sync/user.role.administrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ dependencies:
- media
- media_file_delete
- menu_admin_per_menu
- metatag
- node
- paragraphs
- path
- protected_pages
- rabbit_hole
- redirect
- replicate_ui
Expand Down Expand Up @@ -80,6 +82,7 @@ permissions:
- 'access files overview'
- 'access media overview'
- 'access own webform configuration'
- 'access protected page password screen'
- 'access site in maintenance mode'
- 'access site reports'
- 'access taxonomy overview'
Expand All @@ -98,6 +101,7 @@ permissions:
- 'administer google analytics'
- 'administer js assets injector'
- 'administer main menu items'
- 'administer meta tags'
- 'administer node display'
- 'administer node fields'
- 'administer node form display'
Expand All @@ -106,6 +110,7 @@ permissions:
- 'administer paragraph fields'
- 'administer paragraph form display'
- 'administer paragraphs types'
- 'administer protected pages configuration'
- 'administer redirects'
- 'administer rest resources'
- 'administer scanner settings'
Expand All @@ -116,6 +121,7 @@ permissions:
- 'administer views'
- 'administer webform submission'
- 'allow empty user mail'
- 'bypass pages password protection'
- 'configure editable builder_page node layout overrides'
- 'create accordion block content'
- 'create and edit custom blocks'
Expand Down
2 changes: 2 additions & 0 deletions config/sync/user.role.anonymous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- entity_share_server
- external_entities
- media
- protected_pages
- system
_core:
default_config_hash: 68rVss6EhJ70dZP3kK2ULmGVWGpw2_UrSNFAUiVDxu8
Expand All @@ -15,6 +16,7 @@ weight: -10
is_admin: false
permissions:
- 'access content'
- 'access protected page password screen'
- entity_share_server_access_channels
- 'view media'
- 'view unl_directory_entry external entity'
2 changes: 2 additions & 0 deletions config/sync/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- external_entities
- honeypot
- media
- protected_pages
- system
_core:
default_config_hash: ui2e3Eb7FufQhVaAjwcyBNb2prP1llg1ZKLSlq2AFf8
Expand All @@ -15,6 +16,7 @@ weight: -9
is_admin: false
permissions:
- 'access content'
- 'access protected page password screen'
- 'bypass honeypot protection'
- 'view media'
- 'view unl_directory_entry external entity'
6 changes: 6 additions & 0 deletions config/sync/user.role.coder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ dependencies:
- field_ui
- filter
- google_analytics
- metatag
- node
- paragraphs
- protected_pages
- replicate_ui
- system
- taxonomy
Expand All @@ -31,22 +33,26 @@ permissions:
- 'access contextual links'
- 'access css fields'
- 'access feed overview'
- 'access protected page password screen'
- 'access site reports'
- 'access taxonomy overview'
- 'add JS snippets for google analytics'
- 'administer content types'
- 'administer css assets injector'
- 'administer feeds'
- 'administer js assets injector'
- 'administer meta tags'
- 'administer node display'
- 'administer node fields'
- 'administer node form display'
- 'administer paragraph display'
- 'administer paragraph fields'
- 'administer paragraph form display'
- 'administer protected pages configuration'
- 'administer taxonomy'
- 'administer twig templates'
- 'administer views'
- 'bypass pages password protection'
- 'create html_code block content'
- 'delete any html_code block content'
- 'load twig templates from file system'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ dependencies:
- node
- paragraphs
- path
- protected_pages
- rabbit_hole
- redirect
- replicate_ui
Expand Down Expand Up @@ -78,6 +79,7 @@ permissions:
- 'access files overview'
- 'access media overview'
- 'access own webform configuration'
- 'access protected page password screen'
- 'access site in maintenance mode'
- 'access site reports'
- 'access taxonomy overview'
Expand Down Expand Up @@ -105,6 +107,7 @@ permissions:
- 'administer paragraph fields'
- 'administer paragraph form display'
- 'administer paragraphs types'
- 'administer protected pages configuration'
- 'administer redirects'
- 'administer rest resources'
- 'administer scanner settings'
Expand All @@ -115,6 +118,7 @@ permissions:
- 'administer views'
- 'administer webform submission'
- 'allow empty user mail'
- 'bypass pages password protection'
- 'configure editable builder_page node layout overrides'
- 'create accordion block content'
- 'create and edit custom blocks'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ dependencies:
- entity_share_server
- external_entities
- media
- protected_pages
- system
id: anonymous
label: 'Anonymous user'
weight: -10
is_admin: false
permissions:
- 'access content'
- 'access protected page password screen'
- entity_share_server_access_channels
- 'view media'
- 'view unl_directory_entry external entity'
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ dependencies:
- external_entities
- honeypot
- media
- protected_pages
- system
id: authenticated
label: 'Authenticated user'
weight: -9
is_admin: false
permissions:
- 'access content'
- 'access protected page password screen'
- 'bypass honeypot protection'
- 'view media'
- 'view unl_directory_entry external entity'
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
- metatag
- node
- paragraphs
- protected_pages
- replicate_ui
- system
- taxonomy
Expand All @@ -29,6 +30,7 @@ permissions:
- 'access contextual links'
- 'access css fields'
- 'access feed overview'
- 'access protected page password screen'
- 'access site reports'
- 'access taxonomy overview'
- 'add JS snippets for google analytics'
Expand All @@ -43,9 +45,11 @@ permissions:
- 'administer paragraph display'
- 'administer paragraph fields'
- 'administer paragraph form display'
- 'administer protected pages configuration'
- 'administer taxonomy'
- 'administer twig templates'
- 'administer views'
- 'bypass pages password protection'
- 'create html_code block content'
- 'delete any html_code block content'
- 'load twig templates from file system'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- 'menu_admin_per_menu:menu_admin_per_menu'
- 'metatag:metatag'
- 'paragraphs:paragraphs'
- 'protected_pages:protected_pages'
- 'rabbit_hole:rabbit_hole'
- 'redirect:redirect'
- 'replicate_ui:replicate_ui'
Expand All @@ -53,5 +54,5 @@ dependencies:
- 'webform:webform'
- 'webform:webform_node'
- 'webform:webform_submission_log'
version: 1.4.0
version: 1.4.1
package: Herbie

0 comments on commit 4fbb180

Please sign in to comment.