27 lines
501 B
TypeScript
27 lines
501 B
TypeScript
import type { CollectionConfig } from 'payload'
|
|
|
|
import { authenticated } from '../../access/authenticated'
|
|
|
|
export const Users: CollectionConfig = {
|
|
slug: 'users',
|
|
access: {
|
|
admin: authenticated,
|
|
create: authenticated,
|
|
delete: authenticated,
|
|
read: authenticated,
|
|
update: authenticated,
|
|
},
|
|
admin: {
|
|
defaultColumns: ['name', 'email'],
|
|
useAsTitle: 'name',
|
|
},
|
|
auth: true,
|
|
fields: [
|
|
{
|
|
name: 'name',
|
|
type: 'text',
|
|
},
|
|
],
|
|
timestamps: true,
|
|
}
|