Repository navigation
Group recursion and user authorizations through the v1 API (0.6.7) - #46
Merged
Merged
Conversation
…: set_group_recursive, list/add/update/delete_user_authorization and the UserAuthorization model The GLPI v2 API has no is_recursive on Group and no route for a user's profile and entity authorizations, so these helpers use the v1 session. A v1 write answered false is a refusal and raises GlpiProtocolError with the server message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…PI reference, user guide, provisioning skill and CHANGELOG, version bumped in pyproject, __version__ and every skill Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
==========================================
+ Coverage 98.02% 98.05% +0.03%
==========================================
Files 93 94 +1
Lines 3637 3700 +63
==========================================
+ Hits 3565 3628 +63
Misses 72 72 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
GLPI's v2 API cannot make a group recursive or touch a user's authorizations. This PR adds both through the legacy v1 session, the way document uploads and KB category writes already work.
What was checked against GLPI 11 preprod (2026-10-30):
mainbranch) has nois_recursiveonGroup, though 123 other schemas carry one, and noProfile_Userroute.is_recursivein the body silently drops it.PUT Group/{id}sets it, and v1PUT Profile_User/{id}moves an authorization.Added
set_group_recursive(group_id, recursive=True): v1PUT Group/{id}.Profile_User), as the newUserAuthorizationmodel:list_user_authorizations(user_id)add_user_authorization(user_id, *, profile_id, entity_id, recursive=False)update_user_authorization(authorization_id, *, entity_id=None, recursive=None)delete_user_authorization(authorization_id)ensure_v1_write_accepted: a v1 write answeredfalsenow raisesGlpiProtocolErrorinstead of passing silently. This applies to the new writes only; existing ones are unchanged.RuntimeErrorwhen the client has no v1 session.Not measured on a server
POST Profile_UserandDELETE Profile_User/{id}are GLPI's standard v1 item routes but were tested against fakes only.Release and checks
-Ware clean.The itsm_synchronisation sync needs this release to make the groups it creates recursive and to place the users it creates in their entity.
🤖 Generated with Claude Code