From 8a8a121f4afc15795fe4b58c90fd393ff00297b7 Mon Sep 17 00:00:00 2001 From: syui Date: Wed, 25 Jun 2025 23:14:27 +0900 Subject: [PATCH] fix delete record --- oauth/src/components/ProfileRecordList.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oauth/src/components/ProfileRecordList.jsx b/oauth/src/components/ProfileRecordList.jsx index 5a02128..e196368 100644 --- a/oauth/src/components/ProfileRecordList.jsx +++ b/oauth/src/components/ProfileRecordList.jsx @@ -32,7 +32,11 @@ export default function ProfileRecordList({ profileRecords, apiConfig, user = nu } const canDelete = (profile) => { - return user && agent && profile.uri && profile.value.author?.did === user.did + if (!user || !agent || !profile.uri) return false + + // Check if the record is in the current user's repository + const recordRepoDid = profile.uri.split('/')[2] + return recordRepoDid === user.did } return (