@@ -60,6 +60,13 @@ protected function buildEntityList(): array {
6060 return $ build ;
6161 }
6262
63+
64+ /**
65+ * Add permissions check on operations.
66+ *
67+ * @return array
68+ * A renderable array containing the entity list.
69+ */
6370 public function getDefaultOperations (EntityInterface $ entity ): array {
6471 if ($ this ->currentUser ->hasPermission ('access webform submission list bulk operations and actions ' )) {
6572 return parent ::getDefaultOperations ($ entity );
@@ -69,7 +76,7 @@ public function getDefaultOperations(EntityInterface $entity): array {
6976 $ operations = [];
7077
7178 if ($ entity ->access ('view ' )) {
72- $ operations [ 'view ' ] = [
79+ $ operations ['view ' ] = [
7380 'title ' => $ this ->t ('View ' ),
7481 'weight ' => 20 ,
7582 'url ' => $ this ->requestHandler ->getUrl ($ entity , $ this ->sourceEntity , 'webform.user.submission ' ),
@@ -80,7 +87,7 @@ public function getDefaultOperations(EntityInterface $entity): array {
8087 && $ this ->currentUser ->hasPermission ('access webform submission log ' )
8188 && $ webform ->hasSubmissionLog ()
8289 && $ this ->moduleHandler ->moduleExists ('webform_submission_log ' )) {
83- $ operations [ 'log ' ] = [
90+ $ operations ['log ' ] = [
8491 'title ' => $ this ->t ('Log ' ),
8592 'weight ' => 100 ,
8693 'url ' => $ this ->requestHandler ->getUrl ($ entity , $ this ->sourceEntity , 'webform_submission.log ' ),
@@ -90,4 +97,5 @@ public function getDefaultOperations(EntityInterface $entity): array {
9097 return $ operations ;
9198 }
9299 }
100+
93101}
0 commit comments