From b6f7d36a544a7a8c18c815ef4158cf684108d06d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 16 Aug 2009 03:01:12 +0200 Subject: =?UTF-8?q?Passw=C3=B6rter=20k=C3=B6nnen=20gesetzt=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Server/RequestHandlers/UserRequestHandlerGroup.cpp | 9 +++++++++ src/Server/RequestHandlers/UserRequestHandlerGroup.h | 2 ++ 2 files changed, 11 insertions(+) (limited to 'src/Server') diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp index c0de46a..a1aa829 100644 --- a/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp +++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.cpp @@ -331,6 +331,13 @@ void UserRequestHandlerGroup::handleDeleteUserFromGroupRequest(boost::shared_ptr ret->setType("OK"); } +void UserRequestHandlerGroup::handlePasswordSetRequest(boost::shared_ptr packet, Common::XmlPacket *ret, + Common::Connection* /*connection*/) { + application->getUserManager()->setPassword(packet->get("uid"), packet->get("password")); + + ret->setType("OK"); +} + UserRequestHandlerGroup::UserRequestHandlerGroup(Application *application0) : application(application0) { registerHandler("ListUsers", boost::bind(&UserRequestHandlerGroup::handleUserListRequest, this, _1, _2, _3)); registerHandler("GetUserInfo", boost::bind(&UserRequestHandlerGroup::handleUserInfoRequest, this, _1, _2, _3)); @@ -354,6 +361,8 @@ UserRequestHandlerGroup::UserRequestHandlerGroup(Application *application0) : ap registerHandler("AddUserToGroup", boost::bind(&UserRequestHandlerGroup::handleAddUserToGroupRequest, this, _1, _2, _3)); registerHandler("DeleteUserFromGroup", boost::bind(&UserRequestHandlerGroup::handleDeleteUserFromGroupRequest, this, _1, _2, _3)); + + registerHandler("SetPassword", boost::bind(&UserRequestHandlerGroup::handlePasswordSetRequest, this, _1, _2, _3)); } } diff --git a/src/Server/RequestHandlers/UserRequestHandlerGroup.h b/src/Server/RequestHandlers/UserRequestHandlerGroup.h index c1338c4..ee4b7f4 100644 --- a/src/Server/RequestHandlers/UserRequestHandlerGroup.h +++ b/src/Server/RequestHandlers/UserRequestHandlerGroup.h @@ -56,6 +56,8 @@ class UserRequestHandlerGroup : public Common::RequestHandlers::SimpleRequestHan void handleAddUserToGroupRequest(boost::shared_ptr packet, Common::XmlPacket *ret, Common::Connection *connection); void handleDeleteUserFromGroupRequest(boost::shared_ptr packet, Common::XmlPacket *ret, Common::Connection *connection); + void handlePasswordSetRequest(boost::shared_ptr packet, Common::XmlPacket *ret, Common::Connection *connection); + public: UserRequestHandlerGroup(Application *application0); }; -- cgit v1.2.3