pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

Filter GLPI Objects by groups #3427

Open MaxPresi opened 11 months ago

MaxPresi commented 11 months ago

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

btry commented 11 months ago

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

image

MaxPresi commented 11 months ago

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

btry commented 11 months ago

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.

MaxPresi commented 11 months ago

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

btry commented 11 months ago

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.

MaxPresi commented 11 months ago

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

btry commented 11 months ago

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 .

mneveu-mx commented 9 months ago

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

btry commented 9 months ago

Hi @mneveu-mx

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

mneveu-mx commented 9 months ago

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