diff options
author | dec05eba <0xdec05eba@gmail.com> | 2018-05-15 21:51:22 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-05-15 21:51:24 +0200 |
commit | b4dfb37d35364514c6c17dddcb33114346d75bd0 (patch) | |
tree | 8821a4b2cf096f2fffd112d3c4ff705b92521f3c | |
parent | 9163d30c3c62598e4177d57e0fc088e74def1c66 (diff) |
Remove duplicate authorization for add user (to group)
-rw-r--r-- | src/Database.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
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(); |