Turnstile docs: limit before asking Cloudflare; test and lint fixes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 20:22:21 +01:00
co-authored by Claude Opus 5.5
parent 6ca0730c08
commit b2fed3bf90
4 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -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]')
})
})
-1
View File
@@ -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'