diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-15 21:51:22 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-08-18 23:25:46 +0200 |
commit | 452b68c0fa3722c7d002d24bcf6a54ffb4df8caf (patch) | |
tree | 032a4bfb4609cab4524500cd4bf0d4814cf604fb | |
parent | 585d084fd3a5da06e04a5c95e41733009799a20e (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(); |