refractor(auth): removed password from everywhere

This commit is contained in:
gabdevele
2026-06-16 10:37:31 +02:00 Unverified
parent 4f80d7f995
commit bb7ed18539
25 changed files with 69 additions and 454 deletions
+3 -4
View File
@@ -80,8 +80,7 @@ const JsonRowSchema &adminUserSchema()
static const JsonRowSchema schema{
{"id", JsonFieldType::UInt64},
{"points", JsonFieldType::Int64},
{"banned", JsonFieldType::Bool},
{"must_change_password", JsonFieldType::Bool}};
{"banned", JsonFieldType::Bool}};
return schema;
}
@@ -591,13 +590,13 @@ Json::Value AdminService::listUsers(const auth::UserContext &user)
response["users"] = repositories::resultToJson(
drogon::app().getDbClient()->execSqlSync(
"SELECT u.id, u.first_name, u.last_name, u.email, u.fiscal_code, "
"u.phone, u.points, u.banned, u.must_change_password, "
"u.phone, u.points, u.banned, "
"GROUP_CONCAT(r.name ORDER BY r.name SEPARATOR ',') AS roles "
"FROM users u "
"LEFT JOIN user_roles ur ON ur.user_id = u.id "
"LEFT JOIN roles r ON r.id = ur.role_id "
"GROUP BY u.id, u.first_name, u.last_name, u.email, u.fiscal_code, "
"u.phone, u.points, u.banned, u.must_change_password "
"u.phone, u.points, u.banned "
"ORDER BY u.created_at DESC LIMIT 200"),
adminUserSchema());
return response;