mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Force share generated perm set to read
This commit is contained in:
@@ -64,7 +64,9 @@ export function mergePermissionsForShare(
|
||||
}
|
||||
|
||||
// Explicitly filter out permissions to collections unrelated to the root parent item.
|
||||
const limitedPermissions = currentPermissions.filter(({ collection }) => allowedCollections.includes(collection));
|
||||
const limitedPermissions = currentPermissions.filter(
|
||||
({ action, collection }) => allowedCollections.includes(collection) && action === 'read'
|
||||
);
|
||||
|
||||
return mergePermissions('and', limitedPermissions, generatedPermissions);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user