mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-24 16:54:23 +01:00
Merge branch 'feature/list-your-product-ui' of https://github.com/peakshift/makers.bolt.fun into feature/list-your-product-ui
This commit is contained in:
@@ -766,7 +766,12 @@ const updateProject = extendType({
|
||||
},
|
||||
})
|
||||
|
||||
// Maker can't project info
|
||||
// Verifying current user is a member
|
||||
if (!project.members.some((m) => m.userId === user.id)) {
|
||||
throw new ApolloError("You don't have permission to update this project")
|
||||
}
|
||||
|
||||
// Maker can't change project info
|
||||
if (project.members.find((m) => m.userId === user.id)?.role === ROLE_MAKER) {
|
||||
throw new ApolloError("Makers can't change project info")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user