v1.0 working #1

Merged
dominiknatter merged 6 commits from dev into main 2025-03-27 17:06:30 +00:00
Showing only changes of commit c6ca892187 - Show all commits

View File

@@ -9,6 +9,7 @@ export const Papers: CollectionConfig = {
access: {
create: ({ req: { user } }) => Boolean(user?.type === "admin"),
delete: ({ req: { user } }) => Boolean(user?.type === "admin"),
read: () => true,
update: async ({ req: { user, payload }, id }) => {
if (user?.type === "admin") return true;
@@ -22,7 +23,7 @@ export const Papers: CollectionConfig = {
if (!paper) return false;
return paper.authors.some((author: any) => author.user.name === user.name);
return paper.authors.some((author: any) => author.name === user.name);
},
},
admin: {