Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/syft-enclave/src/syft_enclaves/enclave_job_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def read_permission_rows(self) -> list[tuple[str, str]]:
The enclave shows the approval of every party and what all approved.
A data owner shows its own approval.
"""
rows = [("Requested", format_read_permissions(self.requested_read_permissions))]
requested = format_read_permissions(self.requested_read_permissions)
# The enclave shares the outputs with the submitter whatever the request.
rows = [("Requested", f"{requested}; the submitter always gets outputs/")]
if self.current_user_email == self.datasite_owner_email:
return rows + self._party_rows()
if self._approval_file.exists():
Expand Down
8 changes: 6 additions & 2 deletions packages/syft-enclave/tests/test_read_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,8 @@ def test_display_on_enclave_shows_every_party():
rows = dict(enclave.jobs["j"].read_permission_rows())
# The request survives the distribution, which writes the approval files.
assert rows["Requested"] == (
f"returncode.txt ({ds.email}), stdout.txt ({ds.email})"
f"returncode.txt ({ds.email}), stdout.txt ({ds.email}); "
"the submitter always gets outputs/"
)
assert rows[f"Approved by {do1.email}"] == f"returncode.txt ({ds.email})"
assert rows[f"Approved by {do2.email}"] == "(pending)"
Expand All @@ -633,7 +634,10 @@ def test_display_on_data_owner_shows_own_approval():

job = do1.jobs["j"]
assert job.read_permission_rows() == [
("Requested", f"returncode.txt ({ds.email})"),
(
"Requested",
f"returncode.txt ({ds.email}); the submitter always gets outputs/",
),
("Approved by you", f"returncode.txt ({ds.email})"),
("Approved by all", "needs the approval of every party"),
]
Expand Down
Loading