-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtypes.ts
More file actions
29 lines (27 loc) · 760 Bytes
/
types.ts
File metadata and controls
29 lines (27 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type { GlobalConfig } from "payload";
export type ContentFreezePluginOptions = {
/**
* Enables or disables the plugin.
*
* @default true
*/
enabled?: boolean;
/**
* This function takes the default content freeze settings global configured in the plugin and allows you to override it by modifying and returning it.
*
* @example
* overrideContentFreezeSettingsGlobal: (global) => ({
* ...global,
* access: {
* ...global.access,
* read: ({ req }) => req.user?.role === 'admin',
* update: ({ req }) => req.user?.role === 'admin',
* },
* admin: {
* ...global.admin,
* group: 'Settings',
* },
* }),
*/
overrideContentFreezeSettingsGlobal?: (global: GlobalConfig) => GlobalConfig;
};