Commit 4f8d7f8d authored by Aard's avatar Aard

[ssu] Introduce rnd default domain, add workaround for keeping old rnd domains intact on upgrade

parent 37300dcc
......@@ -312,6 +312,8 @@ void Ssu::sendRegistration(QString usernameDomain, QString password){
} else {
// No domain defined
username = usernameDomain;
if (settings->contains("default-rnd-domain"))
setDomain(settings->value("default-rnd-domain").toString());
}
ssuCaCertificate = SsuRepoManager::caCertificatePath();
......
......@@ -58,12 +58,23 @@ int SsuCoreConfig::deviceMode(){
}
QString SsuCoreConfig::domain(bool pretty){
if (contains("domain"))
if (contains("domain")){
// this is a workaround for upgrading existing devices to
// Jolla sales setup. it should be removed in a few weeks
// this should keep devices with old default domain in rnd
// mode using the proper domain
if (contains("default-rnd-domain") &&
isRegistered() &&
value("domain").toString() == "sales" &&
(deviceMode() & Ssu::RndMode) == Ssu::RndMode)
setValue("domain", value("default-rnd-domain"));
//
if (pretty)
return value("domain").toString().replace(":", "-");
else
return value("domain").toString();
else
} else
return "";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment