@websolutespa/payload-plugin-bowl
Version:
Bowl PayloadCms plugin of the BOM Repository
34 lines (33 loc) • 960 B
JavaScript
import { hasRole, isAdmin, isRole } from '../core';
import { roles } from '../types';
export const ConsentPreference = (options)=>({
type: 'withCollection',
slug: options.slug.consentPreference,
admin: {
group: options.group.gdpr,
hidden: (args)=>!hasRole(args.user, roles.Admin)
},
access: {
create: isAdmin,
read: isRole(),
update: isAdmin,
delete: isAdmin
},
fields: [
{
type: 'withId'
},
{
name: 'description',
label: 'Description',
type: 'withRichText'
},
{
name: 'legalNotice',
label: 'Legal Notice',
type: 'relationship',
relationTo: options.slug.legalNotice
}
]
});
//# sourceMappingURL=ConsentPreference.js.map