formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

Filter GLPI Objects by groups

Open MaxPresi opened this issue 2 years ago • 10 comments

Is there any way to show GPLPI Objects only from the user's group? For example, when the user selects a printer, only those that are in the same group as the user will appear. I don't know if there is a way to do this using the "Group in charge of the hardware" option.

If there was some way to filter the objects by name, when showing the options to the user, it would help, although showing by group would be better.

image

MaxPresi avatar Dec 08 '23 00:12 MaxPresi

Hi

Items displayed in GLPI object questions may be filtered depending on rights of the requester at time of filling the form.

To enable this filtering you must

  • add the type of object in the items associables to a ticket (check in the profile of the user)
  • tune the rights "All items", "my devices", "See hardware of my groups" in the profile.

image

btry avatar Dec 08 '23 08:12 btry

image image

If I check "All Items" it shows all items in the entity. image image

"See hardware of my groups" doesn't make any difference. image image

MaxPresi avatar Dec 08 '23 20:12 MaxPresi

I guess you tried to reproduce the settings in my screenshot, but it was here to locate them.

Disable "all items" and enable at least one of the 2 other settings.

btry avatar Dec 09 '23 06:12 btry

The last two screenshots are with the option "all items" disabled

MaxPresi avatar Dec 09 '23 18:12 MaxPresi

Show the list of printers in the entity of the user. Filter the printers to limit the results to the printers used by that user.

btry avatar Dec 11 '23 06:12 btry

but this way only this user will see the printer, others who also use it and can open a ticket will not.

MaxPresi avatar Dec 11 '23 14:12 MaxPresi

Show the list of printers in the entity of the user. Filter the printers to limit the results to the printers used by that user.

This was a question to diagnose your problem, it does not impacts the current configuration.

So far there is no identified bug on the plugin related to your concern. I guess that you need to tune your users / assets in a way which satisfy your need.

you should modelize relation between assets and users. You may define users as users of a given asset, and you may define groups as users of an asset (or both). The groups obviously contains one or several users.

The plugin uses theses relations to filter the items in the dropdown, like GLPI does in its own ticket form.

You should probably play with these relations and profiles to find a solution which matches your need. Maybe should you query help to forum community .

btry avatar Dec 11 '23 14:12 btry

Hello, I confirm a little bug for the same issue. We have GLPI 10.0.12 and FormCreator 2.13.8, we have a Profile named 'Utilisateur', we have checked to access only to his computers (not all) "Mes matériels" in "Assistance" for this profile : image In our form we cannot access to Computers related to the User mapped with 'Utilisateur' profile : image Here the configuration of the object on the form : image But when we are in the ticket form, this User has access to his computer on the created ticket and can add the computer related. image

mneveu-mx avatar Feb 16 '24 09:02 mneveu-mx

Hi @mneveu-mx

The screenshot shwoinf the setings of your GLPI Objects questions is incomplete. I need to see the seting "Entity restriction" image

btry avatar Feb 19 '24 08:02 btry

Hello @btry, I have tried each "Entity restriction" choice and it is the same : "Form" / "User and form" / "User". I have desactivated "Comportement" plugin for these tests. Maxime

mneveu-mx avatar Feb 20 '24 09:02 mneveu-mx