Turnstile docs: limit before asking Cloudflare; test and lint fixes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6ca0730c08
commit
b2fed3bf90
@@ -72,14 +72,14 @@ describe('exempt from 2FA setup: by an admin-only field, not by e-mail', () => {
|
||||
const rest = await call(`/users/${editorId}`, { body: JSON.stringify({ serviceAccount: true }), method: 'PATCH' })
|
||||
expect(rest.status).toBe(200)
|
||||
await call('/graphql', { body: JSON.stringify({ query: `mutation { updateUser(id: ${JSON.stringify(editorId)}, data: { serviceAccount: true }) { id } }` }), method: 'POST' })
|
||||
const stored = (await payload.findByID({ id: editorId, collection: 'users' as never, overrideAccess: true })) as { serviceAccount?: boolean }
|
||||
const stored = (await payload.findByID({ id: editorId, collection: 'users' as never, overrideAccess: true })) as unknown as { serviceAccount?: boolean }
|
||||
expect(stored.serviceAccount).toBe(false)
|
||||
})
|
||||
|
||||
test('…while the same editor can change its own e-mail to anything: an e-mail list is no boundary', async () => {
|
||||
const res = await call(`/users/${editorId}`, { body: JSON.stringify({ email: '[email protected]' }), method: 'PATCH' })
|
||||
expect(res.status).toBe(200)
|
||||
const stored = (await payload.findByID({ id: editorId, collection: 'users' as never, overrideAccess: true })) as { email: string }
|
||||
const stored = (await payload.findByID({ id: editorId, collection: 'users' as never, overrideAccess: true })) as unknown as { email: string }
|
||||
expect(stored.email).toBe('[email protected]')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -13,7 +13,6 @@ import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import { getPayload } from 'payload'
|
||||
import { afterAll } from 'vitest'
|
||||
|
||||
import { clearReportedOrigins } from '../src/modules/security/totp/sameOrigin.js'
|
||||
import { iapl } from '../src/plugin.js'
|
||||
import { buildTestConfig } from './helpers.js'
|
||||
import { testDatabase } from './http/db.js'
|
||||
|
||||
Reference in New Issue
Block a user