diff options
Diffstat (limited to 'src/Common/UserManager.cpp')
-rw-r--r-- | src/Common/UserManager.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/Common/UserManager.cpp b/src/Common/UserManager.cpp index ae8f3b2..14451aa 100644 --- a/src/Common/UserManager.cpp +++ b/src/Common/UserManager.cpp @@ -258,6 +258,23 @@ void UserManager::updateUser(unsigned long uid, const UserInfo &userInfo) throw( throw Core::Exception(Core::Exception::NOT_IMPLEMENTED); } +void UserManager::deleteUser(unsigned long uid) throw(Core::Exception) { + boost::lock_guard<boost::shared_mutex> lock(mutex); + + for(BackendMap::iterator backend = backends.begin(); backend != backends.end(); ++backend) { + try { + backend->second->deleteUser(uid); + return; + } + catch(Core::Exception e) { + if(e.getErrorCode() != Core::Exception::NOT_IMPLEMENTED) + throw e; + } + } + + throw Core::Exception(Core::Exception::NOT_IMPLEMENTED); +} + void UserManager::addGroup(const GroupInfo &groupInfo) throw(Core::Exception) { boost::lock_guard<boost::shared_mutex> lock(mutex); @@ -292,5 +309,22 @@ void UserManager::updateGroup(unsigned long gid, const GroupInfo &groupInfo) thr throw Core::Exception(Core::Exception::NOT_IMPLEMENTED); } +void UserManager::deleteGroup(unsigned long gid) throw(Core::Exception) { + boost::lock_guard<boost::shared_mutex> lock(mutex); + + for(BackendMap::iterator backend = backends.begin(); backend != backends.end(); ++backend) { + try { + backend->second->deleteGroup(gid); + return; + } + catch(Core::Exception e) { + if(e.getErrorCode() != Core::Exception::NOT_IMPLEMENTED) + throw e; + } + } + + throw Core::Exception(Core::Exception::NOT_IMPLEMENTED); +} + } } |