Files
payloadcms/demo/globals/NavigationArray.ts
2020-11-28 16:07:54 -05:00

28 lines
534 B
TypeScript

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',
}],
},
],
};