QML UI: don't proceed unless cloud credentials are verified

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-06-12 18:05:33 -07:00
parent 1df085240d
commit f7daadb1cd

View file

@ -370,6 +370,18 @@ void QMLManager::retrieveUserid()
revertToNoCloudIfNeeded();
return;
}
if (prefs.cloud_verification_status == CS_NEED_TO_VERIFY) {
// here we need to enter the PIN
appendTextToLog(QStringLiteral("Need to verify the email address - enter PIN in desktop app"));
setStartPageText(RED_FONT + tr("Cannot connect to cloud storage - cloud account not verified") + END_FONT);
revertToNoCloudIfNeeded();
return;
} else if (prefs.cloud_verification_status != CS_VERIFIED) {
appendTextToLog(QString("Cloud account verification failed - status %1").arg(prefs.cloud_verification_status));
setStartPageText(RED_FONT + tr("Cannot connect to cloud storage - check developer log") + END_FONT);
revertToNoCloudIfNeeded();
return;
}
setCredentialStatus(VALID);
QString userid(prefs.userid);
if (userid.isEmpty()) {