Skip to content

4400: Site admin to change node owner #421

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

Open
wants to merge 20 commits into
base: develop
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Nedenfor ses dato for release og beskrivelse af opgaver som er implementeret.

## [Under udvikling]

* Tilføjede mulighed for ændring af ejerskab på node [PR-421](https://github.com/itk-dev/os2forms_selvbetjening/pull/421).

## [4.2.1] 2025-05-06

* Sikrede at OS2Forms attachment elementer bliver detekteret korrekt
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"require": {
"php": "^8.3",
"composer/installers": "^2.0",
"drupal/author_bulk_assignment": "^2.0",
"drupal/chosen": "^5.0",
"drupal/ckeditor": "^1.0",
"drupal/clamav": "^2.0",
"drupal/color": "^1.0",
Expand Down
191 changes: 190 additions & 1 deletion composer.lock

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

This file was deleted.

2 changes: 2 additions & 0 deletions config/sync/author_bulk_assignment.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
types:
- node
20 changes: 20 additions & 0 deletions config/sync/chosen.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
_core:
default_config_hash: zDwqaWPY76K_8TgX6aS789W7nZIEg7lU9MJsoh61bAU
langcode: da
minimum_single: 20
minimum_multiple: 20
disable_search_threshold: 0
minimum_width: 0
max_shown_results: null
use_relative_width: false
jquery_selector: 'select:visible'
search_contains: false
disable_search: false
allow_single_deselect: false
allow_mobile: false
add_helper_buttons: false
disabled_themes: { }
chosen_include: 2
placeholder_text_multiple: 'Choose some options'
placeholder_text_single: 'Choose an option'
no_results_text: 'No results match'
4 changes: 3 additions & 1 deletion config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ module:
admin_toolbar: 0
admin_toolbar_tools: 0
advancedqueue: 0
author_bulk_assignment: 0
automated_cron: 0
beskedfordeler: 0
big_pipe: 0
block: 0
block_content: 0
breakpoint: 0
chosen: 0
chosen_lib: 0
ckeditor: 0
ckeditor5: 0
clamav: 0
Expand Down Expand Up @@ -95,7 +98,6 @@ module:
os2forms_payment: 0
os2forms_permission_alterations: 0
os2forms_permissions_by_term: 0
os2forms_queued_email: 0
os2forms_rest_api: 0
os2forms_sbsys: 0
os2forms_selvbetjening: 0
Expand Down
3 changes: 3 additions & 0 deletions config/sync/language/en/chosen.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
placeholder_text_multiple: 'Choose some options'
placeholder_text_single: 'Choose an option'
no_results_text: 'No results match'
12 changes: 12 additions & 0 deletions config/sync/system.action.node_author_bulk_assignment_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uuid: d851dc6b-d59c-48f1-a4f0-9eb8ab62d01b
langcode: da
status: true
dependencies:
module:
- author_bulk_assignment
- node
id: node_author_bulk_assignment_action
label: 'Assign bulk indholdselement to author'
type: node
plugin: 'entity:author_bulk_assignment_action:node'
configuration: { }
2 changes: 2 additions & 0 deletions config/sync/user.role.site_admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- node.type.webform
- workflows.workflow.udgivelse_af_forlob_og_webformularer
module:
- author_bulk_assignment
- block_content
- content_moderation
- contextual
Expand Down Expand Up @@ -68,6 +69,7 @@ permissions:
- 'administer webform revisions'
- 'administer webform submission'
- 'administer webform templates'
- 'assign author to selected content'
- 'bypass entity print access'
- 'bypass honeypot protection'
- 'can be workflow participant'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ package: 'OS2Forms'
core_version_requirement: ^9 || ^10
dependencies:
- 'webform:webform'
- 'chosen:chosen'
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ function os2forms_selvbetjening_webform_element_alter(array &$element, FormState
$element['#attributes']['class'][] = 'js-form-item';
}
}

/**
* Implements hook_views_plugins_field_alter().
*/
function os2forms_selvbetjening_views_plugins_field_alter(array &$plugins) {
if (array_key_exists('author_assignment_node_bulk_form', $plugins)) {
$plugins['author_assignment_node_bulk_form']['id'] .= '_override';
$plugins['author_assignment_node_bulk_form']['class'] = 'Drupal\os2forms_selvbetjening\Plugin\views\field\AuthorAssignmentNodeBulkFormOverride';
$plugins['author_assignment_node_bulk_form']['provider'] = 'os2forms_selvbetjening';
}
}
Loading
Loading