diff options
| author | Grant Limberg <[email protected]> | 2022-09-28 13:26:41 -0700 |
|---|---|---|
| committer | Grant Limberg <[email protected]> | 2022-09-28 13:26:41 -0700 |
| commit | 4e57abb159885d63f0505e4fdaa235ad90d2fba5 (patch) | |
| tree | e7afc3d6458899c1503041076294093c724990cf /controller/PostgreSQL.cpp | |
| parent | 2b1ba60f24e59874c2767113e8c4aca028f6388e (diff) | |
Revert "modify sso queries for schema change"
This reverts commit 8b67d062721ce65e8bbc4643da4cf351d0759229.
Diffstat (limited to 'controller/PostgreSQL.cpp')
| -rw-r--r-- | controller/PostgreSQL.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index 4ae7aa57..63d32b63 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -442,13 +442,9 @@ AuthInfo PostgreSQL::getSSOAuthInfo(const nlohmann::json &member, const std::str exit(7); } - r = w.exec_params("SELECT oc.client_id, oc.authorization_endpoint, oc.issuer, oc.sso_impl_version " - "FROM ztc_network n " - "INNER JOIN ztc_network_oidc_config noc " - " ON noc.network_id = n.id " - "INNER JOIN ztc_oidc_config oc " - " ON noc.client_id = oc.client_id " - "WHERE n.id = $1 AND n.sso_enabled = true", networkId); + r = w.exec_params("SELECT org.client_id, org.authorization_endpoint, org.issuer, org.sso_impl_version " + "FROM ztc_network AS nw, ztc_org AS org " + "WHERE nw.id = $1 AND nw.sso_enabled = true AND org.owner_id = nw.owner_id", networkId); std::string client_id = ""; std::string authorization_endpoint = ""; |
