Skip to content

fix: validate SharePoint permission HTTP responses - #80

Merged
arekf merged 2 commits into
ifad:masterfrom
Riddlerrr:fix/validate-responses
Oct 21, 2026
Merged

arekf merged 2 commits into
ifad:masterfrom
Riddlerrr:fix/validate-responses

Conversation

@Riddlerrr

@Riddlerrr Riddlerrr commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

SharePoint collaboration permission methods currently report success even when role or inheritance requests fail with HTTP errors. Callers can consequently record grants that were never applied or clear local permission state while remote access remains.

  • Validate responses after granting and revoking roles, and breaking and resetting role inheritance, using the existing HTTP-failure checker.
  • Let the public permission methods raise Sharepoint::Errors::PermissionError instead of returning true on failure.
  • Add per-request regression tests for HTTP 403/503 failures, successful HTTP 200/204 responses, stopping grants after a failure, and preserving unknown-user errors.

Riddlerrr and others added 2 commits October 21, 2026 13:07
The inheritance_response double was created lazily inside the
expectation and never returned by the stub, so the assertion could
not fail.
@arekf
arekf merged commit 589d7cd into ifad:master Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants