From c9c2e1401bae1938fe392f6ee0903939b63b050c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 30 Jun 2009 22:57:29 +0200 Subject: =?UTF-8?q?UserManager=20erweitert=20Erm=C3=B6gliche=20Caching=20d?= =?UTF-8?q?er=20User-Group-Zuordnungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Backends/NetworkUserBackend.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/Common/Backends/NetworkUserBackend.cpp') diff --git a/src/Common/Backends/NetworkUserBackend.cpp b/src/Common/Backends/NetworkUserBackend.cpp index 81fc94a..f75783c 100644 --- a/src/Common/Backends/NetworkUserBackend.cpp +++ b/src/Common/Backends/NetworkUserBackend.cpp @@ -188,6 +188,26 @@ boost::shared_ptr > NetworkUserBackend::getGroupUs return userList; } +boost::shared_ptr > NetworkUserBackend::getFullUserGroupList() throw(Core::Exception) { + boost::shared_ptr request(new SimpleUserRequest(application, "GetFullUserGroupList")); + application->getRequestManager()->sendRequest(connection, request); + request->wait(); + + std::pair, Core::Exception> result = request->getResult(); + if(!result.first || result.second) + throw result.second; + + boost::shared_ptr > ret(new std::multimap); + + const XmlPacket::List *list = result.first->getList("userGroupList"); + if(list) { + for(XmlPacket::List::const_iterator entry = list->begin(); entry != list->end(); ++entry) + ret->insert(std::make_pair(entry->get("uid"), entry->get("gid"))); + } + + return ret; +} + /*void NetworkUserBackend::setPassword(unsigned long uid, const std::string &password) throw(Core::Exception) { -- cgit v1.2.3