aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-15 21:51:22 +0200
committerdec05eba <dec05eba@protonmail.com>2020-08-18 23:25:46 +0200
commit452b68c0fa3722c7d002d24bcf6a54ffb4df8caf (patch)
tree032a4bfb4609cab4524500cd4bf0d4814cf604fb /src
parent585d084fd3a5da06e04a5c95e41733009799a20e (diff)
Remove duplicate authorization for add user (to group)
Diffstat (limited to 'src')
-rw-r--r--src/Database.cpp9
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();