Currently in all the handlers we grab the current MW user from main request context with a TODO comment that we need to figure out how to make it available to the handler more in line with DI. We need to figure that out, add support to the REST framework and use it in out already implemented handlers.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Rest: use Authority in all core handlers | mediawiki/core | master | +174 -348 | |
Rest: inject Authority into Handler | mediawiki/core | master | +100 -113 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Invalid | None | T229661 Core REST API in MediaWiki | |||
Open | None | T237565 REST API Infrastructure in MediaWiki | |||
Resolved | • Pchelolo | T239753 Figure out a way to inject/request a current user from REST API handlers |
Event Timeline
Comment Actions
we need to figure out how to make it available to the handler more in line with DI.
I think the way this should work is a service that takes a request, and returns a user (and session). The request is known to the handler, the service can be injected.
Comment Actions
Change 654473 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Use Authority throughout Rest
Comment Actions
Change 654656 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Rest: use Authority in all core handlers
Comment Actions
Change 654473 merged by jenkins-bot:
[mediawiki/core@master] Rest: inject Authority into Handler
Comment Actions
Change 654656 merged by jenkins-bot:
[mediawiki/core@master] Rest: use Authority in all core handlers