Skip to content

Fix: models using Fields containers hidden and not injected with Fields >= 1.24.7 - #698

Open
borizSam wants to merge 1 commit into
pluginsGLPI:11.0/bugfixesfrom
borizSam:fix/fields-container-rights
Open

borizSam wants to merge 1 commit into
pluginsGLPI:11.0/bugfixesfrom
borizSam:fix/fields-container-rights

Conversation

@borizSam

@borizSam borizSam commented Nov 4, 2026 •

Copy link
Copy Markdown

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.

Description

Since Fields 1.24.7, Fields container classes (PluginFieldsAbstractContainerInstance) always return false in canCreate() / canUpdate().

Because of this, in DataInjection 2.15.12:

  1. Models with Fields columns are hidden from the "Injection of the file" dropdown (checkRightOnModel()).
  2. Fields values are not saved: No right to update data (PluginFields...) (effectiveAddOrUpdate()).

This PR skips the rights check for Fields container classes. The rights on the parent item (e.g. Phone) are still checked.

Tested on GLPI 11.0.7 / DataInjection 2.15.12 / Fields 1.24.7: the model is visible again and the additional fields are saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant