fix: Missing scope on collection query

This commit is contained in:
Tom Moor
2024-04-16 20:02:11 -04:00
parent 38a65a0c59
commit f6786945a0

View File

@@ -171,7 +171,9 @@ if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
switch (type) {
case IntegrationType.Post: {
const collection = await Collection.findByPk(collectionId, {
const collection = await Collection.scope({
method: ["withMembership", user.id],
}).findByPk(collectionId, {
rejectOnEmpty: true,
});
authorize(user, "read", collection);