Don't check related perms for m2a deselect (#19184)

Fixes #19181
This commit is contained in:
Rijk van Zanten
2023-07-17 14:28:40 -04:00
committed by GitHub
parent f1ac443298
commit 9adbb511d7
2 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
---
'@directus/app': patch
---
Fixed issue that would prevent the deselect button from showing up for non-admin users when the deselect action was
configured to cascade

View File

@@ -97,9 +97,7 @@ export function useRelationPermissionsM2A(info: Ref<RelationM2A | undefined>) {
const deleteAllowed = computed(() => {
if (info.value?.junction.meta?.one_deselect_action === 'delete') {
return Object.fromEntries(
Object.entries(relatedPerms.value).map(([key, value]) => [key, value.delete && junctionPerms.value.delete])
);
return Object.fromEntries(Object.entries(relatedPerms.value).map(([key]) => [key, junctionPerms.value.delete]));
}
return Object.fromEntries(