aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Database.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/Database.cpp b/src/Database.cpp
index 8529811..fff74f4 100644
--- a/src/Database.cpp
+++ b/src/Database.cpp
@@ -434,19 +434,6 @@ namespace odhtdb
void Database::addData(const DatabaseNode &nodeInfo, const Signature::KeyPair &userToPerformActionWith, DataView dataToAdd)
{
- if(!databaseStorage.isUserAllowedToAddDataInNode(*nodeInfo.getRequestHash(), userToPerformActionWith.getPublicKey()))
- {
- // TODO: User might have permission to perform operation, but we haven't got the packet that adds user to the group with the permission,
- // or we haven't received the packet that modifies group with the permission to perform the operation.
- // This also means that an user can be in a group that has permission to perform the operation and then later be removed from it,
- // and remote peers would accept our request to perform operation if they haven't received the operation that removes the user from the group.
- // How to handle this?
- string errMsg = "User ";
- errMsg += userToPerformActionWith.getPublicKey().toString();
- errMsg += " is not allowed to perform the operation: ADD_USER";
- throw PermissionDeniedException(errMsg);
- }
-
sibs::SafeSerializer serializer;
serializer.add(DATABASE_ADD_PACKET_STRUCTURE_VERSION);
u64 timestampCombined = getSyncedTimestampUtc().getCombined();