[GLPI 11 main] Problem for plugins - cannot list inventory data from simplified interface
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [x] I have searched the existing issues
Version
GLPI 11 main
Bug description
Following this change: https://github.com/glpi-project/glpi/issues/21509#issuecomment-3432713361, Plugins are affected:
For example, the Consumables plugin, which allows users to request consumables, can no longer list them via its simplified interface. Therefore, it becomes unusable.
Relevant log output
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
No response
Anything else?
No response
@tsmr Is this fixed by #21622?
No sorry - A consumable item is not taken into account when assigning a ticket.
so :
$raw_allowed_itemtypes = $profile->fields['helpdesk_item_type'];
$allowed_itemtypes = importArrayFromDB($raw_allowed_itemtypes);
if (!in_array(static::class, $allowed_itemtypes)) {
return [new QueryExpression('0')];
}
$raw_rights = $profile->fields['helpdesk_hardware'];
$all_assets = $raw_rights & (2 ** CommonITILObject::HELPDESK_ALL_HARDWARE);
if ($all_assets) {
return [new QueryExpression('1')];
}
cannot be used. Perhaps add a $bypass parameter on Dropdown::show ?
If your plugin is supposed to be give the ability to list consumables from the simplified interface, maybe you could add $_SESSION['glpiactiveprofile'][Consumable::$rightname] = READ; in the PluginConsumablesProfile::initProfile() method.