feat(auth): add users collection with role + displayName fields

This commit is contained in:
2026-05-05 07:57:16 +02:00
parent 29dea75a62
commit 2e445b9c5b
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import type { CollectionConfig } from "payload";
export const users: CollectionConfig = {
slug: "users",
auth: true,
admin: {
useAsTitle: "email",
},
fields: [
{
name: "displayName",
type: "text",
},
{
name: "role",
type: "select",
options: [
{ label: "Admin", value: "admin" },
{ label: "Editor", value: "editor" },
{ label: "Author", value: "author" },
],
defaultValue: "author",
required: true,
},
],
};

View File

@@ -0,0 +1 @@
export { users } from "./collections/users";