fix: swap High/Low in BasePermissions.set() and has()#1020
Merged
Conversation
self.High was storing Low bits (0-31) and self.Low was storing High bits (32-63), causing to_json() to serialize values into the wrong SharePoint API fields. Fixed by swapping the assignments in set() and the checks in has() so that names match the SharePoint convention: - Low = bits 0-31 - High = bits 32-63 to_json() and set_property() need no changes. Fixes #959
|
Thank you for fixing it! |
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
BasePermissions.set()andhas()hadHighandLowswapped internally:self.Highself.LowThis caused
to_json()to serialize values into the wrong API fields — sending Low bits asHighand High bits asLow.Fix
Swapped the field assignments in
set()and field checks inhas():to_json()andset_property()are already correct — they just received swapped values.Example
Before fix:
{"Low": 0, "High": 1}{"Low": 8, "High": 0}After fix:
{"Low": 1, "High": 0}{"Low": 0, "High": 8}Fixes #959