massive custom modules and themes D11 compatibility

This commit is contained in:
2026-09-23 14:16:41 +02:00
parent 21092ae992
commit c38d01ee2b
34 changed files with 132 additions and 34 deletions
@@ -9,7 +9,7 @@ use Drupal\Core\Field\FieldItemListInterface;
/**
* Implements hook_entity_field_access().
*/
function materio_jsonapi_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
function materio_jsonapi_entity_field_access($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, ?FieldItemListInterface $items = NULL) {
if ($field_definition->getName() == 'roles' && $operation == 'view') {
$user = $items->getEntity();
if($account->id() == $user->id() && !$user->hasPermission('materio_jsonapi roles')){