Commit b8d6ce6f authored by jan.koester's avatar jan.koester
Browse files

test

parent d715defc
Loading
Loading
Loading
Loading
+6 −3
Changes for modules/users/sources.cpp: 6 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -893,9 +893,12 @@ json_object *adconnectRemove(json_object *args) {
    json_object *domains = savedDomains(ad, domain);
    json_object *e = applyAdconnect(ad.global, domains);
    json_object_put(domains);
    if (e) return e;
    if (secret.compare(0, strlen(AdDir) + 6, std::string(AdDir) + "/bind-") == 0) unlink(secret.c_str());
    return webctl::ok();
    // the password goes once the configuration no longer names the domain
    // (even if switching the service failed after that)
    AdSettings now;
    bool gone = readAd(now, err) && !now.find(domain);
    if (gone && secret.compare(0, strlen(AdDir) + 6, std::string(AdDir) + "/bind-") == 0) unlink(secret.c_str());
    return e ? e : webctl::ok();
}

// {domain: {config, password?}, global?}: that domain alone, with the