Skip to content

Commit

Permalink
Address @mmmarcos comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Dec 30, 2024
1 parent 0c6ef8c commit 7a38af2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub fn start_device_invitation_greet(
pub enum ClientStartShamirRecoveryInvitationGreetError {
#[error("Invitation not found")]
InvitationNotFound,
#[error("No corresponding shamir certificates found")]
#[error("Shamir recovery not found, no shamir certificates found")]
ShamirRecoveryNotFound,
#[error("Shamir recovery has been deleted")]
ShamirRecoveryDeleted,
Expand Down
2 changes: 1 addition & 1 deletion server/parsec/components/memory/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _get_shamir_recovery_invitation(
created_by_human_handle = org.users[invitation.created_by_user_id].cooked.human_handle
claimer_human_handle = org.users[invitation.claimer_user_id].cooked.human_handle

# Mark active invitations as CANCELLED if the shamir recovery is deleted
# Consider an active invitation as CANCELLED if the corresponding shamir recovery is deleted
if status in (InvitationStatus.IDLE, InvitationStatus.READY) and shamir_recovery.is_deleted:
status = InvitationStatus.CANCELLED

Expand Down
8 changes: 4 additions & 4 deletions server/parsec/components/postgresql/shamir.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
)
from parsec.ballpark import RequireGreaterTimestamp, TimestampOutOfBallpark
from parsec.components.postgresql import AsyncpgConnection, AsyncpgPool
from parsec.components.postgresql.shamir_delete import delete
from parsec.components.postgresql.shamir_setup import setup
from parsec.components.postgresql.shamir_delete import shamir_delete
from parsec.components.postgresql.shamir_setup import shamir_setup
from parsec.components.postgresql.utils import transaction
from parsec.components.shamir import (
BaseShamirComponent,
Expand Down Expand Up @@ -55,7 +55,7 @@ async def setup(
| TimestampOutOfBallpark
| RequireGreaterTimestamp
):
return await setup(
return await shamir_setup(
conn,
now,
organization_id,
Expand Down Expand Up @@ -85,7 +85,7 @@ async def delete(
| TimestampOutOfBallpark
| RequireGreaterTimestamp
):
return await delete(
return await shamir_delete(
conn,
now,
organization_id,
Expand Down
2 changes: 1 addition & 1 deletion server/parsec/components/postgresql/shamir_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
)


async def delete(
async def shamir_delete(
conn: AsyncpgConnection,
now: DateTime,
organization_id: OrganizationID,
Expand Down
2 changes: 1 addition & 1 deletion server/parsec/components/postgresql/shamir_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
)


async def setup(
async def shamir_setup(
conn: AsyncpgConnection,
now: DateTime,
organization_id: OrganizationID,
Expand Down
4 changes: 2 additions & 2 deletions server/parsec/components/postgresql/user_get_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
UNION ALL
-- Shamir recovery certificates for ourself
-- Shamir recovery brief & deletion certificates for the user
(
SELECT
Expand Down Expand Up @@ -215,7 +215,7 @@
UNION ALL
-- Shamir recovery certificates for others
-- Shamir recovery brief, share & deletion certificates where the user is part of the recipients
(
SELECT
Expand Down

0 comments on commit 7a38af2

Please sign in to comment.