Needs review
Project:
Webform Score
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 May 2025 at 13:25 UTC
Updated:
6 May 2025 at 07:33 UTC
Jump to comment: Most recent
This module provides field access hook which is based upon property `denominator` to determine access rights.
The problem is that Drupal core Map - \Drupal\Core\Field\Plugin\Field\FieldType\MapItem field type have simple getter
/**
* {@inheritdoc}
*/
public function __get($name) {
if (!isset($this->values[$name])) {
$this->values[$name] = [];
}
return $this->values[$name];
}
Which in conjunction with webform_score_entity_field_access is going to mark any Map field type as forbidden.
if (!$items || !$items[0] || is_null($items[0]->denominator)) {
return AccessResult::neutral();
}
if (!$items[0]->denominator) {
// No scoring is configured.
return AccessResult::forbidden()->cachePerPermissions();
}We should check by field type initiall, if is not fraction, that access is neutral
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
valicComment #4
valicComment #5
valic