generated from autonomic-cooperative/astro-payload-template
Create author component
This commit is contained in:
@ -3,12 +3,11 @@ import { isAdmin } from "@/access/isAdmin";
|
||||
import { isEditor } from "@/access/isEditor";
|
||||
import { isSSG } from "@/access/isSSG";
|
||||
import { isUser } from "@/access/isUser";
|
||||
import { isEditorOrSelf } from "@/access/isEditorOrSelf";
|
||||
|
||||
const Authors: CollectionConfig = {
|
||||
slug: "authors",
|
||||
admin: {
|
||||
defaultColumns: ["avatar","name"],
|
||||
defaultColumns: ["name"],
|
||||
useAsTitle: "name",
|
||||
},
|
||||
access: {
|
||||
@ -19,20 +18,26 @@ const Authors: CollectionConfig = {
|
||||
delete: isEditor,
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: "avatar",
|
||||
type: "upload",
|
||||
relationTo: "media",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "name",
|
||||
type: "text",
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: "avatar",
|
||||
type: "upload",
|
||||
relationTo: "media",
|
||||
name: "bio",
|
||||
type: "text",
|
||||
required: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "user",
|
||||
type: "relationship",
|
||||
type: "upload",
|
||||
relationTo: "users",
|
||||
admin: {
|
||||
description: 'The selected user will be able to edit this author'
|
||||
|
Reference in New Issue
Block a user