Small fixes: optional R2_PUBLIC_URL, seo.uploadsCollection, staff features without roles
- ipalEnvRules({ storage: true }): R2_PUBLIC_URL optional (media served by
the app); storage: { requirePublicUrl: true } requires it again.
- seo.uploadsCollection: upload collection of the meta image (default media).
- userMeetsRole(req, minimum): the plugin's admin/editor features (Site
Integrations, settings globals, test e-mail, stats, consent records, form
submissions) stay reachable when `access` is omitted — without a roles
field every logged-in account passes, as in Payload's default.
- IndexNow skip for seed writes is covered by test/seed.test.ts.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
cff76c2a69
commit
4911da7112
@@ -1,6 +1,6 @@
|
||||
import type { GlobalConfig } from 'payload'
|
||||
|
||||
import { adminOrEditor } from '../../modules/access/index.js'
|
||||
import { userMeetsRole } from '../../modules/access/index.js'
|
||||
import { notificationsFields } from './fields.js'
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ export function buildNotifications(): GlobalConfig {
|
||||
slug: 'notifications',
|
||||
access: {
|
||||
read: () => true, // texts are public-facing (shown to end users)
|
||||
update: adminOrEditor,
|
||||
update: ({ req }) => userMeetsRole(req, 'editor'),
|
||||
},
|
||||
admin: { group: 'Settings' },
|
||||
fields: notificationsFields,
|
||||
|
||||
Reference in New Issue
Block a user