From 16a9b3e33cd4e377417dcc785be7e19bf71e18b9 Mon Sep 17 00:00:00 2001 From: dec05eba <0xdec05eba@gmail.com> Date: Wed, 16 May 2018 05:29:39 +0200 Subject: Add method to get user groups --- include/odhtdb/Database.hpp | 2 ++ include/odhtdb/DatabaseStorage.hpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/odhtdb/Database.hpp b/include/odhtdb/Database.hpp index ca9369f..a68c601 100644 --- a/include/odhtdb/Database.hpp +++ b/include/odhtdb/Database.hpp @@ -189,6 +189,8 @@ namespace odhtdb // Returns nodes, public key and private key of encrypted user. // Throws DatabaseStorageWrongPassword if password for the stored user is wrong. std::vector getStoredUserNodeDataDecrypted(const std::string &username, const std::string &password); + + std::vector getUserGroups(const Hash &nodeHash, const Signature::PublicKey &userPublicKey) const; private: void deserializeCreateRequest(const std::shared_ptr &value, const Hash &hash, const std::shared_ptr encryptionKey); void deserializeAddRequest(const std::shared_ptr &value, const Hash &requestDataHash, const std::shared_ptr &nodeHash, const std::shared_ptr encryptionKey); diff --git a/include/odhtdb/DatabaseStorage.hpp b/include/odhtdb/DatabaseStorage.hpp index f03bd9e..2b1e552 100644 --- a/include/odhtdb/DatabaseStorage.hpp +++ b/include/odhtdb/DatabaseStorage.hpp @@ -140,6 +140,8 @@ namespace odhtdb const std::vector& getRemoteNodes() const; void setRemoteNodes(const std::vector &remoteNodes); + std::vector getUserGroups(const Hash &nodeHash, const Signature::PublicKey &userPublicKey) const; + const dht::crypto::Identity& getIdentity() const; // Update storage state (remove quarantine objects if they are too old, etc) -- cgit v1.2.3