Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Composer
plugin
Drupal Environment
Commits
9b9311cb
Commit
9b9311cb
authored
5 months ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Update patch for webform
parent
c4753189
No related branches found
No related tags found
1 merge request
!349
Merging develop into main
Pipeline
#1354173
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/d10/3487530.diff
+9
-5
9 additions, 5 deletions
patches/d10/3487530.diff
with
9 additions
and
5 deletions
patches/d10/3487530.diff
+
9
−
5
View file @
9b9311cb
diff --git a/src/WebformEntityListBuilder.php b/src/WebformEntityListBuilder.php
diff --git a/src/WebformEntityListBuilder.php b/src/WebformEntityListBuilder.php
index 827110be1d819f7e7090c415498d0a747ada0765..
1b3cc372d5ee8025ab983faf98cd6695fb505f2a
100644
index 827110be1d819f7e7090c415498d0a747ada0765..
c27958aa5b7e3b3dfa31f4f4a23722fb4942ba56
100644
--- a/src/WebformEntityListBuilder.php
--- a/src/WebformEntityListBuilder.php
+++ b/src/WebformEntityListBuilder.php
+++ b/src/WebformEntityListBuilder.php
@@ -173,
7
+173,
7
@@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
@@ -173,
8
+173,
11
@@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
$build['table']['#attributes']['class'][] = 'webform-forms';
$build['table']['#attributes']['class'][] = 'webform-forms';
// Bulk operations.
// Bulk operations.
- if ($this->bulkOperations && $this->currentUser->hasPermission('administer webform')) {
- if ($this->bulkOperations && $this->currentUser->hasPermission('administer webform')) {
+ if ($this->bulkOperations && ($this->currentUser->hasPermission('administer webform') || $this->currentUser->hasPermission('administer webform overview'))) {
+ if ($this->bulkOperations && ($this->currentUser->hasPermission('administer webform') || $this->currentUser->hasPermission('administer webform overview'))) {
$build['table'] = \Drupal::formBuilder()->getForm('\Drupal\webform\Form\WebformEntityBulkForm', $build['table']);
$build['table'] = \Drupal::formBuilder()->getForm('\Drupal\webform\Form\WebformEntityBulkForm', $build['table']);
+ if (!$this->currentUser->hasPermission('delete any webform')) {
+ unset($build['table']['operations']['action']['#options']['webform_delete_action']);
+ }
}
}
@@ -194,7 +194,7 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
// Attachments.
@@ -194,7 +197,7 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
*/
*/
protected function buildFilterForm() {
protected function buildFilterForm() {
// Add the filter by key(word) and/or state.
// Add the filter by key(word) and/or state.
...
@@ -20,7 +24,7 @@ index 827110be1d819f7e7090c415498d0a747ada0765..1b3cc372d5ee8025ab983faf98cd6695
...
@@ -20,7 +24,7 @@ index 827110be1d819f7e7090c415498d0a747ada0765..1b3cc372d5ee8025ab983faf98cd6695
$state_options = [
$state_options = [
(string) $this->t('Active') => [
(string) $this->t('Active') => [
'' => $this->t('All [@total]', ['@total' => $this->getTotal(NULL, NULL)]),
'' => $this->t('All [@total]', ['@total' => $this->getTotal(NULL, NULL)]),
@@ -231,7 +23
1
,7 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
@@ -231,7 +23
4
,7 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
*/
*/
protected function buildInfo() {
protected function buildInfo() {
// Display info.
// Display info.
...
@@ -29,7 +33,7 @@ index 827110be1d819f7e7090c415498d0a747ada0765..1b3cc372d5ee8025ab983faf98cd6695
...
@@ -29,7 +33,7 @@ index 827110be1d819f7e7090c415498d0a747ada0765..1b3cc372d5ee8025ab983faf98cd6695
return [
return [
'#markup' => $this->formatPlural($total, '@count webform', '@count webforms'),
'#markup' => $this->formatPlural($total, '@count webform', '@count webforms'),
'#prefix' => '<div>',
'#prefix' => '<div>',
@@ -672,12 +67
2
,12 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
@@ -672,12 +67
5
,12 @@
class WebformEntityListBuilder extends ConfigEntityListBuilder {
* Is the current user a webform administrator.
* Is the current user a webform administrator.
*
*
* @return bool
* @return bool
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment