Skip to content

Commit

Permalink
Fix(Core): fix 'Component' option (#404)
Browse files Browse the repository at this point in the history
* Fix(Core): fix 'Component' option

* fix CS

* adapt changelog
  • Loading branch information
stonebuzz authored Dec 16, 2024
1 parent 638bce6 commit e13d7ef
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed

- Fix `Use Components` to display all components

### Fixed

- Hide `items` without proper user access rights in the family list.

## [2.14.10] - 2024-09-06
Expand Down
43 changes: 29 additions & 14 deletions inc/object.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,35 @@ public static function registerType()
PluginGenericobjectType::includeConstants($item->getObjectTypeName());

Plugin::registerClass($class, [
"document_types" => $item->canUseDocuments(),
"helpdesk_visible_types" => $item->canUseTickets(),
"linkgroup_types" => isset($fields["groups_id"]),
"linkuser_types" => isset($fields["users_id"]),
"linkgroup_tech_types" => isset($fields["groups_id_tech"]),
"linkuser_tech_types" => isset($fields["users_id_tech"]),
"ticket_types" => $item->canUseTickets(),
"infocom_types" => $item->canUseInfocoms(),
"networkport_types" => $item->canUseNetworkPorts(),
"reservation_types" => $item->canBeReserved(),
"contract_types" => $item->canUseContracts(),
"unicity_types" => $item->canUseUnicity(),
"location_types" => isset($fields['locations_id']),
"itemdevices_types" => $item->canUseItemDevice()
"document_types" => $item->canUseDocuments(),
"helpdesk_visible_types" => $item->canUseTickets(),
"linkgroup_types" => isset($fields["groups_id"]),
"linkuser_types" => isset($fields["users_id"]),
"linkgroup_tech_types" => isset($fields["groups_id_tech"]),
"linkuser_tech_types" => isset($fields["users_id_tech"]),
"ticket_types" => $item->canUseTickets(),
"infocom_types" => $item->canUseInfocoms(),
"networkport_types" => $item->canUseNetworkPorts(),
"reservation_types" => $item->canBeReserved(),
"contract_types" => $item->canUseContracts(),
"unicity_types" => $item->canUseUnicity(),
"location_types" => isset($fields['locations_id']),
"itemdevices_types" => $item->canUseItemDevice(),
"itemdevicememory_types" => $item->canUseItemDevice(),
"itemdevicepowersupply_types" => $item->canUseItemDevice(),
"itemdevicenetworkcard_types" => $item->canUseItemDevice(),
"itemdeviceharddrive_types" => $item->canUseItemDevice(),
"itemdevicebattery_types" => $item->canUseItemDevice(),
"itemdevicefirmware_types" => $item->canUseItemDevice(),
"itemdevicesimcard_types" => $item->canUseItemDevice(),
"itemdevicegeneric_types" => $item->canUseItemDevice(),
"itemdevicepci_types" => $item->canUseItemDevice(),
"itemdevicesensor_types" => $item->canUseItemDevice(),
"itemdeviceprocessor_types" => $item->canUseItemDevice(),
"itemdevicesoundcard_types" => $item->canUseItemDevice(),
"itemdevicegraphiccard_types" => $item->canUseItemDevice(),
"itemdevicemotherboard_types" => $item->canUseItemDevice(),
"itemdevicecamera_types" => $item->canUseItemDevice(),
]);

if (plugin_genericobject_haveRight($class, READ)) {
Expand Down

0 comments on commit e13d7ef

Please sign in to comment.