fix(security): apply two findings from sharing security review
- get_document: strip extracted_text for share recipients (T-04-04-03 consistency) - ShareModal: emit 'unshared' when last recipient is revoked; DocumentCard clears is_shared badge Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
v-if="showShareModal"
|
||||
:doc="doc"
|
||||
@close="showShareModal = false"
|
||||
@unshared="doc.is_shared = false"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -125,7 +125,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
const emit = defineEmits(['close', 'unshared'])
|
||||
|
||||
const docsStore = useDocumentsStore()
|
||||
|
||||
@@ -202,6 +202,7 @@ async function handleRevoke(shareId) {
|
||||
|
||||
try {
|
||||
await docsStore.revokeShare(shareId)
|
||||
if (shares.value.length === 0) emit('unshared', props.doc.id)
|
||||
} catch (e) {
|
||||
// Re-add on failure
|
||||
if (removed && removedIdx !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user