Files
payload/demo/globals/NavigationArray.ts
2020-12-01 16:38:27 -05:00

29 lines
627 B
TypeScript

import { PayloadGlobalConfig } from '../../src/globals/config/types';
import checkRole from '../access/checkRole';
export default {
slug: 'navigation-array',
label: 'Navigation Array',
access: {
update: ({ req: { user } }) => checkRole(['admin', 'user'], user),
read: () => true,
},
fields: [
{
name: 'array',
label: 'Array',
type: 'array',
localized: true,
fields: [{
name: 'text',
label: 'Text',
type: 'text',
}, {
name: 'textarea',
label: 'Textarea',
type: 'textarea',
}],
},
],
} as PayloadGlobalConfig;