Merged
Conversation
a09e3e3 to
adc0a7f
Compare
cconard96
suggested changes
Jan 30, 2025
Co-authored-by: Curtis Conard <cconard96@gmail.com>
cconard96
suggested changes
Feb 4, 2025
| function plugin_init_myplugin() { | ||
| global $PLUGIN_HOOKS; | ||
|
|
||
| $PLUGIN_HOOKS['csrf_compliant']['myplugin'] = true; |
Contributor
There was a problem hiding this comment.
Suggested change
| $PLUGIN_HOOKS['csrf_compliant']['myplugin'] = true; | |
| $PLUGIN_HOOKS['csrf_compliant']['myplugin'] = true; |
This hook doesn't exist anymore as far as I know. All plugins are expected to handle CSRF.
Collaborator
There was a problem hiding this comment.
It's been removed in GLPI v11, but seems still present on v10.
Collaborator
There was a problem hiding this comment.
I keep this one open for reference when working on the GLPI v11 version
|
|
||
| This instanciation function is important, we will declare later here `Hooks` on GLPI internal API. | ||
| It's systematically called on **all** GLPI pages except if the ``_check_prerequisites`` fails (see below). | ||
| We declare here that our plugin forms are `CSRF <https://en.wikipedia.org/wiki/Cross-Site_Request_Forgery>`_ compliant even if for now our plugin does not contain any form. |
Collaborator
There was a problem hiding this comment.
I keep this one open for reference when working on the GLPI v11 version
Thanks Curtis! Co-authored-by: Curtis Conard <cconard96@gmail.com>
Co-authored-by: Curtis Conard <cconard96@gmail.com>
cconard96
suggested changes
Feb 5, 2025
trasher
reviewed
Feb 6, 2025
trasher
reviewed
Feb 6, 2025
Co-authored-by: Curtis Conard <cconard96@gmail.com>
cconard96
approved these changes
Feb 6, 2025
orthagh
commented
Feb 6, 2025
trasher
reviewed
Feb 7, 2025
trasher
reviewed
Feb 7, 2025
Co-authored-by: Alexandre Delaunay <delaunay.alexandre@gmail.com>
trasher
added a commit
that referenced
this pull request
Feb 7, 2025
* tutorial for developping a plugin * update doc * Fix syntax * clean php snippets * clean use * clean use * Few fixes * Fix doc links * Translate titles * Rework main title * Translation * Dead ref * Translate * Remove metabase part * Translate * Fix internal links * Apply suggestions from code review Co-authored-by: Curtis Conard <cconard96@gmail.com> * Work on translations * Maybe should not we use logDebug. * Translation, minor fix * Fix syntax * Translate * Translate * Translate * No direct querying * End translation * Typo * Typos, misssed translations * Apply suggestions from code review Thanks Curtis! Co-authored-by: Curtis Conard <cconard96@gmail.com> * Update source/plugins/tutorial.rst Co-authored-by: Curtis Conard <cconard96@gmail.com> * A word about npm. Precision: composer and npm are not mandatory * Apply suggestions from code review Co-authored-by: Curtis Conard <cconard96@gmail.com> * Add download_url and a note on plugin submission URL * Apply suggestions from code review Co-authored-by: Alexandre Delaunay <delaunay.alexandre@gmail.com> * Replace old links --------- Co-authored-by: Johan Cwiklinski <johan@x-tnd.be> Co-authored-by: Curtis Conard <cconard96@gmail.com>
cedric-anne
pushed a commit
that referenced
this pull request
May 19, 2025
* tutorial for developping a plugin * update doc * Fix syntax * clean php snippets * clean use * clean use * Few fixes * Fix doc links * Translate titles * Rework main title * Translation * Dead ref * Translate * Remove metabase part * Translate * Fix internal links * Apply suggestions from code review Co-authored-by: Curtis Conard <cconard96@gmail.com> * Work on translations * Maybe should not we use logDebug. * Translation, minor fix * Fix syntax * Translate * Translate * Translate * No direct querying * End translation * Typo * Typos, misssed translations * Apply suggestions from code review Thanks Curtis! Co-authored-by: Curtis Conard <cconard96@gmail.com> * Update source/plugins/tutorial.rst Co-authored-by: Curtis Conard <cconard96@gmail.com> * A word about npm. Precision: composer and npm are not mandatory * Apply suggestions from code review Co-authored-by: Curtis Conard <cconard96@gmail.com> * Add download_url and a note on plugin submission URL * Apply suggestions from code review Co-authored-by: Alexandre Delaunay <delaunay.alexandre@gmail.com> * Replace old links --------- Co-authored-by: Johan Cwiklinski <johan@x-tnd.be> Co-authored-by: Curtis Conard <cconard96@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: