refactor(api): reuse web app access queries for permissions - #40984
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-08-20 01:21:36.786475036 +0000
+++ /tmp/pyrefly_pr.txt 2026-08-20 01:21:23.256435721 +0000
@@ -3861,7 +3861,7 @@
ERROR `SimpleNamespace` is not assignable to attribute `request` with type `Request` [bad-assignment]
--> tests/unit_tests/controllers/trigger/test_webhook.py:13:22
ERROR Object of class `Exception` has no attribute `data` [missing-attribute]
- --> tests/unit_tests/controllers/web/test_app.py:190:16
+ --> tests/unit_tests/controllers/web/test_app.py:192:16
ERROR Object of class `ModuleType` has no attribute `web_ns` [missing-attribute]
--> tests/unit_tests/controllers/web/test_message_list.py:57:9
ERROR Object of class `ModuleType` has no attribute `WebApiResource` [missing-attribute]
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #40984 +/- ##
==========================================
+ Coverage 86.77% 86.81% +0.04%
==========================================
Files 5198 5355 +157
Lines 291555 295691 +4136
Branches 58090 59194 +1104
==========================================
+ Hits 253001 256715 +3714
- Misses 33569 33992 +423
+ Partials 4985 4984 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hjlarry
marked this pull request as ready for review
August 20, 2026 01:25
hjlarry
requested review from
QuantumGhost,
crazywoola and
laipz8200
as code owners
August 20, 2026 01:25
lyzno1
approved these changes
Aug 20, 2026
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
WebAppAccessQueryServicewith permission decisions for/webapp/permissionWebAppAuthService,FeatureService, and Enterprise calls from the permission handlerweb_sso_auth_required(401) and known permission dependency failures toweb_app_access_unavailable(503)dump_response(BooleanResultResponse, ...)Replacement
Replaces #40491, which GitHub automatically closed while it was in the merge queue after the lower branches in native Stack #40556 were merged and deleted.
#40482 and #40555 are now merged. This PR reapplies only #40491's three reviewed commits onto the current
main; the patch is unchanged according togit range-diff.Compatibility
appIdandX-App-Coderequirements and error textvisitorfallback when the passport has nouser_idThe single access-mode snapshot makes the narrow concurrent
private -> publictransition fail closed instead of temporarily allowing access.Validation
git range-diffgit diff --check