D22288: force a token refresh before submitting the report
Harald Sitter
noreply at phabricator.kde.org
Fri Jul 5 11:50:38 BST 2019
sitter created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.
REVISION SUMMARY
when the user takes a very long time to prepare the bug report the original
login session may have timed out and prevent submitting the bug report.
as a super simple way to prevent this let's simply force a refresh.
we need to do a query to check validity anyway, so we might as well
force a refresh and get a new token right away.
this temporarily chains the login interfaces to the report interfaces, upon
successful login the report is sent. if any of the two throws an error
the page goes into error state which offers a retry button to run
aboutToShow again. therefore we also want to disconnect the signal chains
to avoid multiple slot invocations on possible retries.
BUG: 338216
FIXED-IN: 5.17.0
CHANGELOG: Login tokens get refreshed before submitting reports to prevent unauthorized errors
TEST PLAN
- file bug without any interruption all goody
- add `Bugzilla::connection().setToken(QString());` to simulate the token having gone invalid -> continues to work
- disconnect network before submit causes a network unreachable login error -> connect again -> retry -> submission succeeds
REPOSITORY
R871 DrKonqi
BRANCH
refresh-token
REVISION DETAIL
https://phabricator.kde.org/D22288
AFFECTED FILES
src/bugzillaintegration/bugzillalib.cpp
src/bugzillaintegration/bugzillalib.h
src/bugzillaintegration/reportassistantpages_bugzilla.cpp
src/bugzillaintegration/reportinterface.h
To: sitter
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190705/ab97a99b/attachment.html>
More information about the Plasma-devel
mailing list