Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a temporary development contributor role and modified some custom code to include this role. Fixes #883. #884

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/sync/administerusersbyrole.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ roles:
site_admin: safe
coder: safe
administrator: perm
temporary_development_contributor: safe
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: 24a12fbf-cbeb-42ee-808f-5017c9875f75
langcode: en
status: true
dependencies:
config:
- user.role.temporary_development_contributor
module:
- user
id: user_add_role_action.temporary_development_contributor
label: 'Add the Temporary development contributor role to the selected user(s)'
type: user
plugin: user_add_role_action
configuration:
rid: temporary_development_contributor
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: d3faa6a8-7813-4253-b587-49f9a15b4cee
langcode: en
status: true
dependencies:
config:
- user.role.temporary_development_contributor
module:
- user
id: user_remove_role_action.temporary_development_contributor
label: 'Remove the Temporary development contributor role from the selected user(s)'
type: user
plugin: user_remove_role_action
configuration:
rid: temporary_development_contributor
1 change: 1 addition & 0 deletions config/sync/user.role.coder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies:
- system
- taxonomy
- twig_ui
- unl_webform
- views_ui
_core:
default_config_hash: pjZngoP_kq80I1xBCMa6k4sk--mrzHRIpBC2HjNgftE
Expand Down
88 changes: 88 additions & 0 deletions config/sync/user.role.temporary_development_contributor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
uuid: ff8091ad-f06f-4399-955b-2766bdcb377c
langcode: en
status: true
dependencies:
config:
- filter.format.html_code
- filter.format.webform_email
module:
- asset_injector
- block_content_permissions
- contextual
- feeds
- feeds_tamper
- field_css
- field_ui
- filter
- google_analytics
- google_tag
- group
- key
- metatag
- moderated_content_bulk_publish
- node
- paragraphs
- protected_pages
- replicate_ui
- salesforce
- salesforce_mapping
- system
- taxonomy
- twig_ui
- unl_webform
- views_ui
id: temporary_development_contributor
label: 'Temporary development contributor'
weight: -2
is_admin: null
permissions:
- 'access contextual links'
- 'access css fields'
- 'access feed overview'
- 'access group overview'
- 'access site reports'
- 'access taxonomy overview'
- 'access unl webform options'
- 'add JS snippets for google analytics'
- 'administer content types'
- 'administer css assets injector'
- 'administer feeds'
- 'administer feeds_tamper'
- 'administer google_tag_container'
- 'administer js assets injector'
- 'administer key configuration overrides'
- 'administer keys'
- '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 salesforce'
- 'administer salesforce mapped objects'
- 'administer salesforce mapping'
- 'administer taxonomy'
- 'administer taxonomy_term display'
- 'administer taxonomy_term fields'
- 'administer taxonomy_term form display'
- 'administer twig templates'
- 'administer views'
- 'authorize salesforce'
- 'bypass pages password protection'
- 'create group_subsite group'
- 'create html_code block content'
- 'delete any html_code block content'
- 'load twig templates from file system'
- 'moderated content bulk draft'
- 'moderated content bulk pin'
- 'moderated content bulk publish'
- 'moderated content bulk save content'
- 'moderated content bulk unpin'
- 'moderated content bulk unpublish'
- 'replicate entities'
- 'update any html_code block content'
- 'use text format html_code'
- 'use text format webform_email'
- 'view salesforce mapping'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
roles:
viewer: safe
editor: safe
site_admin: safe
coder: safe
administrator: perm
temporary_development_contributor: safe
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
features:
logo: false
slogan: true
favicon: 1
favicon: 0
node_user_picture: false
comment_user_picture: true
comment_user_verification: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ required:
- entity_usage.settings
- google_tag.settings
- moderated_content_bulk_publish.settings
- administerusersbyrole.settings
- views.view.content
- system.action.draft_current
- system.action.pin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ name: 'Herbie config'
description: 'A bundle of miscellaneous configuration files, mainly to override default configuration in modules or other settings. '
type: module
core_version_requirement: '^9.4 || ^10'
version: '1.4'
version: '1.5'
package: Herbie
dependencies:
- 'administerusersbyrole:administerusersbyrole'
- 'drupal:node'
- 'drupal:system'
- 'drupal:user'
- 'drupal:views'
- 'entity_usage:entity_usage'
- 'google_tag:google_tag'
- 'moderated_content_bulk_publish:moderated_content_bulk_publish'
- 'linkit:linkit'
- 'moderated_content_bulk_publish:moderated_content_bulk_publish'
- 'replicate_ui:replicate_ui'
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- system
- taxonomy
- twig_ui
- unl_webform
- views_ui
id: coder
label: Developer
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
langcode: en
status: true
dependencies:
config:
- filter.format.html_code
- filter.format.webform_email
module:
- asset_injector
- block_content_permissions
- contextual
- feeds
- feeds_tamper
- field_css
- field_ui
- filter
- google_analytics
- google_tag
- group
- key
- metatag
- moderated_content_bulk_publish
- node
- paragraphs
- protected_pages
- replicate_ui
- salesforce
- salesforce_mapping
- system
- taxonomy
- twig_ui
- unl_webform
- views_ui
id: temporary_development_contributor
label: 'Temporary development contributor'
weight: -2
is_admin: null
permissions:
- 'access contextual links'
- 'access css fields'
- 'access feed overview'
- 'access group overview'
- 'access site reports'
- 'access taxonomy overview'
- 'access unl webform options'
- 'add JS snippets for google analytics'
- 'administer content types'
- 'administer css assets injector'
- 'administer feeds'
- 'administer feeds_tamper'
- 'administer google_tag_container'
- 'administer js assets injector'
- 'administer key configuration overrides'
- 'administer keys'
- '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 salesforce'
- 'administer salesforce mapped objects'
- 'administer salesforce mapping'
- 'administer taxonomy'
- 'administer taxonomy_term display'
- 'administer taxonomy_term fields'
- 'administer taxonomy_term form display'
- 'administer twig templates'
- 'administer views'
- 'authorize salesforce'
- 'bypass pages password protection'
- 'create group_subsite group'
- 'create html_code block content'
- 'delete any html_code block content'
- 'load twig templates from file system'
- 'moderated content bulk draft'
- 'moderated content bulk pin'
- 'moderated content bulk publish'
- 'moderated content bulk save content'
- 'moderated content bulk unpin'
- 'moderated content bulk unpublish'
- 'replicate entities'
- 'update any html_code block content'
- 'use text format html_code'
- 'use text format webform_email'
- 'view salesforce mapping'
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ dependencies:
- 'webform:webform'
- 'webform:webform_node'
- 'webform:webform_submission_log'
version: 1.7.0
version: 1.7.1
package: Herbie
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ protected function alterRoutes(RouteCollection $collection) {
// toolbar menu item by denying access to the route.
if ($route = $collection->get('entity.group.collection')) {
$groups = \Drupal::entityTypeManager()->getStorage('group')->loadMultiple();
if (!$groups && empty(array_intersect(['super_administrator', 'administrator', 'coder'], \Drupal::currentUser()->getRoles()))) {
if (!$groups && empty(array_intersect(['super_administrator', 'administrator', 'coder', 'temporary_development_contributor'], \Drupal::currentUser()->getRoles()))) {
$route->setRequirement('_access', 'FALSE');
}
}
Expand Down
1 change: 1 addition & 0 deletions web/modules/custom/unl_views/unl_views.module
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function unl_views_form_views_exposed_form_alter(&$form, FormStateInterface $for
unset($form['role']['#options']['administrator']);
unset($form['role']['#options']['super_administrator']);
unset($form['role']['#options']['coder']);
unset($form['role']['#options']['temporary_development_contributor']);
}
}
}