fix tenant account unbind flow
Desktop Client Build / Resolve Build Metadata (push) Successful in 28s
Frontend CI / Frontend (push) Successful in 2m53s
Backend CI / Backend (push) Successful in 16m10s
Desktop Client Build / Build Desktop Client (push) Successful in 23m44s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 50s
Desktop Client Build / Resolve Build Metadata (push) Successful in 28s
Frontend CI / Frontend (push) Successful in 2m53s
Backend CI / Backend (push) Successful in 16m10s
Desktop Client Build / Build Desktop Client (push) Successful in 23m44s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 50s
This commit is contained in:
@@ -68,6 +68,7 @@ type DesktopAccountRepository interface {
|
||||
Upsert(ctx context.Context, params UpsertDesktopAccountParams) (*DesktopAccount, error)
|
||||
Patch(ctx context.Context, params PatchDesktopAccountParams) (*DesktopAccount, error)
|
||||
Tombstone(ctx context.Context, desktopID uuid.UUID, workspaceID int64, clientID uuid.UUID, ifSyncVersion int64) (*DesktopAccount, error)
|
||||
TombstoneForActor(ctx context.Context, desktopID uuid.UUID, workspaceID, userID int64) (*DesktopAccount, error)
|
||||
MarkDeleteRequested(ctx context.Context, desktopID uuid.UUID, workspaceID, userID int64) (*DesktopAccount, error)
|
||||
ClearDeleteRequested(ctx context.Context, desktopID uuid.UUID, workspaceID, userID int64) (*DesktopAccount, error)
|
||||
}
|
||||
@@ -222,6 +223,18 @@ func (r *desktopAccountRepository) Tombstone(ctx context.Context, desktopID uuid
|
||||
return desktopAccountFromTombstoneRow(row)
|
||||
}
|
||||
|
||||
func (r *desktopAccountRepository) TombstoneForActor(ctx context.Context, desktopID uuid.UUID, workspaceID, userID int64) (*DesktopAccount, error) {
|
||||
row, err := r.q.TombstoneDesktopAccountForActor(ctx, generated.TombstoneDesktopAccountForActorParams{
|
||||
DesktopID: pgUUID(desktopID),
|
||||
WorkspaceID: workspaceID,
|
||||
UserID: userID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return desktopAccountFromTombstoneForActorRow(row)
|
||||
}
|
||||
|
||||
func (r *desktopAccountRepository) MarkDeleteRequested(ctx context.Context, desktopID uuid.UUID, workspaceID, userID int64) (*DesktopAccount, error) {
|
||||
row, err := r.q.MarkDesktopAccountDeleteRequested(ctx, generated.MarkDesktopAccountDeleteRequestedParams{
|
||||
DesktopID: pgUUID(desktopID),
|
||||
@@ -407,6 +420,29 @@ func desktopAccountFromTombstoneRow(row generated.TombstoneDesktopAccountRow) (*
|
||||
)
|
||||
}
|
||||
|
||||
func desktopAccountFromTombstoneForActorRow(row generated.TombstoneDesktopAccountForActorRow) (*DesktopAccount, error) {
|
||||
return buildDesktopAccount(
|
||||
row.DesktopID,
|
||||
row.TenantID,
|
||||
row.WorkspaceID,
|
||||
row.UserID,
|
||||
row.ClientID,
|
||||
row.PlatformID,
|
||||
row.PlatformUid,
|
||||
row.AccountFingerprint,
|
||||
row.DisplayName,
|
||||
row.AvatarUrl,
|
||||
row.Health,
|
||||
row.VerifiedAt,
|
||||
row.Tags,
|
||||
row.SyncVersion,
|
||||
row.DeletedAt,
|
||||
row.DeleteRequestedAt,
|
||||
row.CreatedAt,
|
||||
row.UpdatedAt,
|
||||
)
|
||||
}
|
||||
|
||||
func desktopAccountFromMarkDeleteRow(row generated.MarkDesktopAccountDeleteRequestedRow) (*DesktopAccount, error) {
|
||||
return buildDesktopAccount(
|
||||
row.DesktopID,
|
||||
|
||||
Reference in New Issue
Block a user