From 452b68c0fa3722c7d002d24bcf6a54ffb4df8caf Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 May 2018 21:51:22 +0200 Subject: Remove duplicate authorization for add user (to group) --- src/Database.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src') diff --git a/src/Database.cpp b/src/Database.cpp index 874b225..82cb21e 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -476,15 +476,6 @@ namespace odhtdb void Database::addUser(const DatabaseNode &nodeInfo, const Signature::KeyPair &userToPerformActionWith, const Signature::PublicKey &userToAddPublicKey, const DataView &groupToAddUserTo) { - if(!databaseStorage.isUserAllowedToAddUserToGroupInNode(*nodeInfo.getRequestHash(), userToPerformActionWith.getPublicKey(), groupToAddUserTo)) - { - string errMsg = "The user "; - errMsg += userToPerformActionWith.getPublicKey().toString(); - errMsg += " does not belong to any group that is allowed to add an user to the group "; - errMsg += bin2hex((const char*)groupToAddUserTo.data, groupToAddUserTo.size).c_str(); - throw PermissionDeniedException(errMsg); - } - sibs::SafeSerializer serializer; serializer.add(DATABASE_ADD_PACKET_STRUCTURE_VERSION); u64 timestampCombined = getSyncedTimestampUtc().getCombined(); -- cgit v1.2.3