Fix deactivate button never rendering on the group Users tab - #2
Closed
OscarBeiro wants to merge 2 commits into
Closed
Fix deactivate button never rendering on the group Users tab#2OscarBeiro wants to merge 2 commits into
OscarBeiro wants to merge 2 commits into
Conversation
GLPI 11's core CheckCsrfListener already validates and consumes the CSRF token for every POST request before a Symfony-routed controller runs. The manual Session::validateCSRF() call added in 2.0.2 always found the token already spent, so every activate/deactivate click was rejected. Removed the redundant check; core already enforces it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsonuwXxLGnoCtfkviVBmC
The JS selector that injects the "Deactivate" button next to each active member was malformed (input[name^='item[Group_User]' — missing the closing ]), so jQuery threw a syntax error and the whole $(document).ready callback aborted. No deactivate button ever appeared, making the plugin's core deactivate flow unusable from the UI. Also adds a run-moregroups Claude Code skill with a Playwright driver that exercises the full deactivate/reactivate flow — both the single-row buttons and both massive actions — against a live GLPI 11 instance, to catch this class of bug (invisible to php -l/phpcs/PHPStan) going forward. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w4D3KeE6Z3BCX6nZgy1CX
Merged
Contributor
|
Hola! Cerramos esta PR porque el fix del CSRF ya se aplicó en la PR#3 que hizo María ( |
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.
Summary
input[name^='item[Group_User]'— missing the closing]) ininc/group.class.phpthat threw a JS syntax error and aborted the whole$(document).readycallback, so the "Deactivate" button never rendered next to active group members.run-moregroupsClaude Code skill (.claude/skills/run-moregroups/) with a Playwright driver that logs into a live GLPI 11 instance and exercises the full deactivate/reactivate flow — both the single-row buttons and both massive actions — to catch this class of bug going forward (invisible tophp -l/phpcs/PHPStan since it's embedded JS in a PHP heredoc).Test plan
TESTING.mdchecks #5, #7, #10, #11.🤖 Generated with Claude Code
https://claude.ai/code/session_011w4D3KeE6Z3BCX6nZgy1CX