Repository: OpenMined/PySyft

Issue:
DS can not retrieve the results of their computations even after being approved.
## Description
Data Scientists can not retrieve the result of their computations even after having their data access request approved by the Data Owner.

## How to Reproduce
```
import syft as sy

do_client = sy.login(
    email="info@openmined.org",
    password="changethis",
    port=8081
)

# Create a new Data Scientist User
do_client.users.create(name='DataScientist', 
    email='DataScientist@gmail.com', 
    password = 'DataScientist',
    budget=0,
    role = "Data Scientist"
)

# login as a Data Scientist User
ds_client = sy.login(
    email="DataScientist1@gmail.com",
    password="DataScientist",
    port=8081
)


# Send a tensor using the Data Owner Session
x_s = x.send(do_client, tags=["#X", "#diabetes"], description="My diabetes y label")

# Get a pointer to the data using the Data Scientist Session
ds_x_pointer = ds_client.store[0]

# Perform Arbitrary computation
result = ds_x_pointer + ds_x_pointer

# Submit Data Access request as a Data Scientist
result.request(reason="I'd like to see my result ...")

# Approve Data Access Request as a Data Owner
do_client.requests[0].approve()


# Try to retrieve your result as a Data Scientist
result.get_copy()
```

## Expected Behavior
We should be able to retrieve the values of our result if the data access request was approved.


## Additional Comments
- This workflow is important for the not fully automated use cases where we don't use Differential Privacy and the Data Owner still needs to inspect data access requests.
- It's important to add some tests to keep tracking this workflow in future changes as well.
- Special thanks to @mikaelapisani  for discovering and reporting it.


Discussion:

Resolving patch:
diff --git a/packages/syft/src/syft/core/node/common/node_manager/redis_store.py b/packages/syft/src/syft/core/node/common/node_manager/redis_store.py
--- a/packages/syft/src/syft/core/node/common/node_manager/redis_store.py
+++ b/packages/syft/src/syft/core/node/common/node_manager/redis_store.py
@@ -192,6 +192,16 @@ def set(self, key: StoreKey, value: StorableObject) -> None:
         local_session = sessionmaker(bind=self.db)()
         if create_metadata:
             local_session.add(metadata_obj)
+        else:
+            local_session.query(ObjectMetadata).filter_by(obj=key_str).update(
+                {
+                    "tags": value.tags,
+                    "description": value.description,
+                    "read_permissions": metadata_obj.read_permissions,
+                    "write_permissions": metadata_obj.write_permissions,
+                    "search_permissions": metadata_obj.search_permissions,
+                }
+            )
         local_session.commit()
         local_session.close()
 
diff --git a/packages/syft/src/syft/core/node/common/node_service/object_request/object_request_service.py b/packages/syft/src/syft/core/node/common/node_service/object_request/object_request_service.py
--- a/packages/syft/src/syft/core/node/common/node_service/object_request/object_request_service.py
+++ b/packages/syft/src/syft/core/node/common/node_service/object_request/object_request_service.py
@@ -614,7 +614,7 @@ def accept_or_deny_request(
                 )
                 tmp_obj.read_permissions[
                     VerifyKey(_req.verify_key.encode("utf-8"), encoder=HexEncoder)
-                ] = _req.id
+                ] = _req.user_id
                 node.store[UID.from_string(_req.object_id)] = tmp_obj
 
             # TODO: In the future we'll probably need to keep a request history


Test patch: