-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a hook to allow plugins to blacklist types from tagging #134
Conversation
One question here. Is it worth maintaining blacklist? Currently I noticed that for example in GLPI10 it is displayed on Tasks and other unusual places where it is useless.. |
@VladoTTX, your are right, it may be better to use an inclusion list, instead of an exclusion list, but it may require some more work.
We recently worked on this kind of list in fields plugin, it may help. see https://github.com/pluginsGLPI/fields/blob/2064d8a8c5ae71efbb82a6e1f89661475e5e7f12/inc/toolbox.class.php#L206-L354 I will not have time right now to work on this topic, but if someone have time to work on it, I would take time to quickly review the PR. Also, it may help to handle #133 in a more proper way. |
Hi I may submit an other version which changes PluginTagTag::canItemtype().
|
And what about starting with removing PluginTagTag::getBlacklistItemtype() and changing Lines 72 to 75 in 4affdcb
to whitelist version:
This would remove tags from places where they were not meant to be used (but I am not sure about tags witch are without Associated Item types). |
Hi This should work. |
I started to work on this in #135, but it is far from beiing finished. |
Hi is it still relevant? |
IMHO, if there is an itemtype to exclude, maintainers of other plugins could directly open a PR here to add the class in the blacklisted itemtypes. If we provide a hook and I guess that many people will not be aware of it, and will probably still open issues when there is a new itemtype to exclude, even if we add some kind of documentation for it. |
Formcreator has a class in the hard coded blacklist, and the class name will change within 2023. Some other classes should be added. It is easier for plugin maintenance to let other plugin to manage themselve the blacklist
pluginsGLPI/formcreator#2964