Always add domain delimiter if "Domain" checkbox is selected
ClosedPublic

Authored by bruns on Apr 23 2018, 5:57 PM.

Details

Summary

EwsConfigDialog::fullUsername() always adds the domain delimiter when
the "Domain" checkbox is set, even if the actual domain name is empty,
while the login procedure in EwsResource::passwordRequestFinished(...)
only adds a domain delimiter if the domain is non-empty. Make sure
login in the config dialog and during normal operation is equivalent.

Not sending an (empty) domain causes login failures for some servers,
while sending it seems to be unproblematic, and can be forced off by
unselecting the checkbox.

This fixes a regression caused by commit
7c74258355cd ("EWS: Refactor server connection and password retrieval"),
which changed the check for sending the domain from mSettings->hasDomain()
to mSettings->domain().isEmpty().

BUG: 388496
CCBUG: 390798

Test Plan

Check the login from the config-dialog, once with, once without
checking "Domain"
Try to sync the resource

Diff Detail

Repository
R44 KDE PIM Runtime
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 23 2018, 5:57 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 23 2018, 5:57 PM
bruns requested review of this revision.Apr 23 2018, 5:57 PM
bruns edited the test plan for this revision. (Show Details)Apr 23 2018, 6:00 PM
dvratil accepted this revision.May 2 2018, 6:00 AM

Can't test, but looks OK to me.

This revision is now accepted and ready to land.May 2 2018, 6:00 AM
This revision was automatically updated to reflect the committed changes.