### What? There were a couple issues with the implementation within the example when using postgres. - `ensureUniqueUsername` tenant was being extracted incorrectly, should not constrain query unless it was present - `ensureUniqueSlug` was querying by NaN when tenant was not present on data or originalDoc - `users` read access was not correctly extracting the tenant id in the correct type depending on DB Fixes https://github.com/payloadcms/payload/issues/11484
5 lines
245 B
Plaintext
5 lines
245 B
Plaintext
DATABASE_URI=mongodb://127.0.0.1/payload-example-multi-tenant
|
|
POSTGRES_URL=postgres://127.0.0.1:5432/payload-example-multi-tenant
|
|
PAYLOAD_SECRET=PAYLOAD_MULTI_TENANT_EXAMPLE_SECRET_KEY
|
|
PAYLOAD_PUBLIC_SERVER_URL=http://localhost:3000
|
|
SEED_DB=true |