Loading src/blogi.cpp +16 −2 Original line number Diff line number Diff line Loading @@ -2302,7 +2302,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: std::string message, messageType; std::string removeAuthIdx, removeMediaIdx; std::string connType, connDomain, connUrl, connClientName, connClientSecret, connTls; std::string connType, connDomain, connUrl, connClientName, connClientSecret, connTls, connLoginEligible; bool haveAdd = false; for (const auto &cur : form.urlData()) { Loading @@ -2314,6 +2314,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: else if (cur.key == "conn_clientname") connClientName = cur.value; else if (cur.key == "conn_clientsecret") connClientSecret = cur.value; else if (cur.key == "conn_tlsverify") connTls = cur.value; else if (cur.key == "conn_login_eligible") connLoginEligible = cur.value; } if (!removeAuthIdx.empty()) Loading Loading @@ -2361,6 +2362,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: as.clientName = connClientName; as.clientSecret = connClientSecret; as.tlsVerify = tlsVerify; as.loginEligible = (connLoginEligible == "on" || connLoginEligible == "true" || connLoginEligible == "1"); srcs.push_back(as); cfg.saveAuthSources(db, srcs); } Loading @@ -2384,7 +2386,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: "Auth-Verbindungen (Failover-Kette je Domain -- mehrere Eintraege mit gleicher Domain werden der Reihe nach versucht)")); { json_object *jheaders = json_object_new_array(); for (const char *h : {"Domain", "URL", "Client", "TLS", ""}) for (const char *h : {"Domain", "URL", "Client", "TLS", "blogi-Login", ""}) json_object_array_add(jheaders, json_object_new_string(h)); json_object_object_add(jauthTable, "headers", jheaders); Loading @@ -2398,6 +2400,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: json_object_array_add(jcells, json_object_new_string(s.url.c_str())); json_object_array_add(jcells, json_object_new_string(s.clientName.c_str())); json_object_array_add(jcells, json_object_new_string(s.tlsVerify ? "ja" : "nein")); json_object_array_add(jcells, json_object_new_string(s.loginEligible ? "ja" : "nein (nur Plugins)")); json_object_object_add(jrow, "cells", jcells); json_object *jactions = json_object_new_array(); Loading Loading @@ -2513,6 +2516,17 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: json_object_object_add(jf, "type", json_object_new_string("checkbox")); json_object_array_add(jfields, jf); } { json_object *jf = json_object_new_object(); json_object_object_add(jf, "name", json_object_new_string("conn_login_eligible")); json_object_object_add(jf, "label", json_object_new_string( "Login-faehig fuer blogi-Backend (nur Auth -- abwaehlen fuer eine Quelle, die nur ein Plugin fuer eigene " "Domain-/GPO-Pruefungen nutzen soll, z.B. Schimmeldocs Admin-/Moderator-Domain. Bei einer solchen " "Plugin-only-Quelle kann sich niemand darueber ins blogi-Backend einloggen)")); json_object_object_add(jf, "type", json_object_new_string("checkbox")); json_object_object_add(jf, "value", json_object_new_string("on")); json_object_array_add(jfields, jf); } json_object_object_add(jform, "fields", jfields); json_object_object_add(jform, "submit", json_object_new_string("Hinzufuegen")); Loading Loading
src/blogi.cpp +16 −2 Original line number Diff line number Diff line Loading @@ -2302,7 +2302,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: std::string message, messageType; std::string removeAuthIdx, removeMediaIdx; std::string connType, connDomain, connUrl, connClientName, connClientSecret, connTls; std::string connType, connDomain, connUrl, connClientName, connClientSecret, connTls, connLoginEligible; bool haveAdd = false; for (const auto &cur : form.urlData()) { Loading @@ -2314,6 +2314,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: else if (cur.key == "conn_clientname") connClientName = cur.value; else if (cur.key == "conn_clientsecret") connClientSecret = cur.value; else if (cur.key == "conn_tlsverify") connTls = cur.value; else if (cur.key == "conn_login_eligible") connLoginEligible = cur.value; } if (!removeAuthIdx.empty()) Loading Loading @@ -2361,6 +2362,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: as.clientName = connClientName; as.clientSecret = connClientSecret; as.tlsVerify = tlsVerify; as.loginEligible = (connLoginEligible == "on" || connLoginEligible == "true" || connLoginEligible == "1"); srcs.push_back(as); cfg.saveAuthSources(db, srcs); } Loading @@ -2384,7 +2386,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: "Auth-Verbindungen (Failover-Kette je Domain -- mehrere Eintraege mit gleicher Domain werden der Reihe nach versucht)")); { json_object *jheaders = json_object_new_array(); for (const char *h : {"Domain", "URL", "Client", "TLS", ""}) for (const char *h : {"Domain", "URL", "Client", "TLS", "blogi-Login", ""}) json_object_array_add(jheaders, json_object_new_string(h)); json_object_object_add(jauthTable, "headers", jheaders); Loading @@ -2398,6 +2400,7 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: json_object_array_add(jcells, json_object_new_string(s.url.c_str())); json_object_array_add(jcells, json_object_new_string(s.clientName.c_str())); json_object_array_add(jcells, json_object_new_string(s.tlsVerify ? "ja" : "nein")); json_object_array_add(jcells, json_object_new_string(s.loginEligible ? "ja" : "nein (nur Plugins)")); json_object_object_add(jrow, "cells", jcells); json_object *jactions = json_object_new_array(); Loading Loading @@ -2513,6 +2516,17 @@ static json_object *SettingsConnections(dbpp::ReplicatedDatabase &db, libhttppp: json_object_object_add(jf, "type", json_object_new_string("checkbox")); json_object_array_add(jfields, jf); } { json_object *jf = json_object_new_object(); json_object_object_add(jf, "name", json_object_new_string("conn_login_eligible")); json_object_object_add(jf, "label", json_object_new_string( "Login-faehig fuer blogi-Backend (nur Auth -- abwaehlen fuer eine Quelle, die nur ein Plugin fuer eigene " "Domain-/GPO-Pruefungen nutzen soll, z.B. Schimmeldocs Admin-/Moderator-Domain. Bei einer solchen " "Plugin-only-Quelle kann sich niemand darueber ins blogi-Backend einloggen)")); json_object_object_add(jf, "type", json_object_new_string("checkbox")); json_object_object_add(jf, "value", json_object_new_string("on")); json_object_array_add(jfields, jf); } json_object_object_add(jform, "fields", jfields); json_object_object_add(jform, "submit", json_object_new_string("Hinzufuegen")); Loading