refractor(auth): removed password from everywhere
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user