Admin wording and layout guide (docs/dev/admin-ux.md); dev editor login
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e53d09b720
commit
4c55d7aeff
@@ -2,3 +2,9 @@ export const devUser = {
|
||||
email: '[email protected]',
|
||||
password: '[email protected]',
|
||||
}
|
||||
|
||||
/** Second dev login with the editor role — for checking what editors see. */
|
||||
export const devEditor = {
|
||||
email: '[email protected]',
|
||||
password: '[email protected]',
|
||||
}
|
||||
|
||||
+6
-1
@@ -1,6 +1,6 @@
|
||||
import type { Payload } from 'payload'
|
||||
|
||||
import { devUser } from './helpers/credentials.js'
|
||||
import { devEditor, devUser } from './helpers/credentials.js'
|
||||
|
||||
export const seed = async (payload: Payload) => {
|
||||
const { totalDocs } = await payload.count({
|
||||
@@ -23,6 +23,11 @@ export const seed = async (payload: Payload) => {
|
||||
})
|
||||
}
|
||||
|
||||
const editors = await payload.count({ collection: 'users', where: { email: { equals: devEditor.email } } })
|
||||
if (!editors.totalDocs) {
|
||||
await payload.create({ collection: 'users', data: { ...devEditor, roles: ['editor'] } })
|
||||
}
|
||||
|
||||
await seedContactPage(payload)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user