chore: allow password to be mutated by hooks (#7537)
Fixes https://github.com/payloadcms/payload/issues/7531 Allows passwords to be updated in hooks.
This commit is contained in:
9
test/_community/collections/Users/index.ts
Normal file
9
test/_community/collections/Users/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { CollectionConfig } from '../../../../packages/payload/src/collections/config/types'
|
||||
|
||||
export const usersSlug = 'users'
|
||||
|
||||
export const UsersCollection: CollectionConfig = {
|
||||
fields: [],
|
||||
auth: true,
|
||||
slug: usersSlug,
|
||||
}
|
||||
@@ -2,11 +2,13 @@ import { buildConfigWithDefaults } from '../buildConfigWithDefaults'
|
||||
import { devUser } from '../credentials'
|
||||
import { MediaCollection } from './collections/Media'
|
||||
import { PostsCollection, postsSlug } from './collections/Posts'
|
||||
import { UsersCollection } from './collections/Users'
|
||||
import { MenuGlobal } from './globals/Menu'
|
||||
|
||||
export default buildConfigWithDefaults({
|
||||
// ...extend config here
|
||||
collections: [
|
||||
UsersCollection,
|
||||
PostsCollection,
|
||||
MediaCollection,
|
||||
// ...add more collections here
|
||||
|
||||
Reference in New Issue
Block a user