184 Commits

Author SHA1 Message Date
Ziyi fa6299100d feat(content-manager): add Zod 4 foundation utilities (#25574) 2026-04-30 14:55:04 +02:00
Boaz Poolman ec72af97f0 Fix polymorphic relations in the document service API (#26099)
* chore: remove early exit for morph relation types

* fix: issues with creating morphToOne relations

* chore: add tests

* test: add polymorphic relations tests

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-04-30 11:58:02 +02:00
Nico André 52b8fd9e3d feat(admin): api token supports admin permissions and admin user ownership (#25657) 2026-04-29 17:57:36 +02:00
Jamie Howard 62a6230772 test: relations available status (#26051) 2026-04-24 10:39:17 +02:00
Ziyi ab7d9c38ec fix(document-service): preserve self-referential relations during publish and discard (#25890)
* fix(document-service): preserve self-referential relations during publish/discard

* test(document-service): convert self-referential API test to TypeScript

* fix(document-service): use JoinTable type and tighten Record types in self-referential-relations

* test(document-service): remove weak load() happy-path unit test

* fix(document-service): skip mappedBy attrs, deduplicate and idempotent-insert self-refs

* test(document-service): fix missing dialect and trx mocks in self-referential-relations tests

* fix(tests): use count assertions for CM API self-referential relation tests
2026-04-23 13:32:04 +02:00
Laurens Kling 104969fd8f fix(document-service): support delete selection params (#25097)
* feat: allow selectionParams in documents.delete

* fix(document-service): preserve locale-scoped delete lookup with selection params

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2026-04-23 10:12:13 +03:00
Bassel Kanso e66251a30c fix(i18n): preserve non-localized media when creating a locale (#26031) 2026-04-21 14:00:24 +03:00
markkaylor 7f17643db5 fix(upload): content-api does not return signed urls (#26034) 2026-04-17 10:17:51 +02:00
Adrien L f57a81a5a3 fix: bulk publish validation on required components in dz (#25687)
Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-04-15 14:06:22 +02:00
Jamie Howard 43420134cc fix(document-service): preserve relations during publish (#25909)
* fix(document-service): preserve relations during publish

* test: correct plural name for legacy model

* chore: update description

* fix: skip unstable virtual relations

* chore: invisible relation handling
2026-04-13 11:50:01 +01:00
Jamie Howard db2ec304ff fix(core): add firstPublishedAt field to draft (#25947)
* fix(core): add firstPublishedAt field to draft

* test: add unit test firstPublishedAt

---------

Co-authored-by: Ziyi <daydreamnation@live.com>
Co-authored-by: Alex Birkner <github@tyrola.dev>
2026-04-13 11:13:46 +01:00
Adrien L 1799b42980 fix: preserve relations in fill from another locale (#25703) 2026-04-10 16:30:34 +02:00
Jamie Howard a9afb42db9 RBAC "Move to stage" for review workflows (#25723)
* feat: 'toPermissions' in stage management

* test: enhance stage tests

* test: add api tests for to stage permissions

* feat: migration for backward compatible stage transfer permissions

* chore: rename permissions to fromPermissions in workflow stages

* chore: improve type definitions

* chore: rename permissions to fromPermissions
2026-04-01 12:27:54 +01:00
Ben Irvin 62f601ae76 test(api): add REST tests for relation documentId shorthand (#25870) 2026-03-31 14:05:24 +00:00
Jamie Howard 0a1886db0f fix(core): relation handling preserves order during unpublish/republish cycles (#25764)
* fix(core): relation handling preserves order during unpublish/republish cycles

* fix: preserve bidirectional order (#25792)

- Keep join rows when related side is still draft; map to published id when available
- Sync owner-side join order when publishing the owning type (inversedBy path)
- Refactor bidirectional load into shared capture + draft→published mapping helpers

Co-authored-by: Ben Irvin <ben@innerdvations.com>

* chore(core): re add order fix

* chore(core): improve structure and batch processing

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
2026-03-31 14:08:26 +01:00
Ben Irvin 1459f88cde fix: contains filter no longer returns empty data (#25810)
* fix: contains filter no longer returns empty data

* chore: fix comments

* fix(utils): stop recursing opaque operator operands in filter traversal

* fix(utils): keep Date and other operand objects when stripping empty filters
2026-03-31 14:15:27 +02:00
guoyangzhen 8af200e5e0 fix: change return to continue in deleteRelations when using foreign keys (#25857)
* test(api): add morphToMany delete test

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-31 10:26:56 +02:00
Ben Irvin c89195bced test(api): add querylimit middleware test (#25765) 2026-03-30 09:51:30 +02:00
Ben Irvin cc6b0c661b fix: use max batch sizes per dialect (#25390) 2026-03-30 09:39:46 +02:00
Ziyi 24c887eff6 fix(document-service): re-insert cascade-deleted bidirectional relations (#25725) 2026-03-23 11:13:22 +01:00
Jamie Howard ed80b16a8e test: enhance validation tests for repeatable components and dynamic zones (#25714)
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2026-03-19 13:13:38 +00:00
Ziyi 08c3b0f003 fix: Content types with attributes named filters, sort, fields, or populate no longer cause 400 validation errors on populate queries and countDraftRelations (#21338) (#25762)
* fix(utils): make convertNestedPopulate schema-aware to prevent keyword collision
2026-03-18 15:48:54 +01:00
Ben Irvin 38049559a0 fix: use strapi.fetch for remote uploads (#25661) 2026-03-18 12:34:39 +01:00
Jamie Howard a6fd594526 Chore/cm combined performance fixes (#25678)
* fix(content-manager): reduce over-populated localizations and metadata (#25557)

* Chore: Content manager performance optimizations (#25600)

* chore(content-manager): wip reduce overhead in metadata queries, populate building, and list view

* fix(content-manager): update document metadata query to select specific fields

* chore(content-manager): document metadata consolidate field selection

* chore(content-manager): streamline locale, enhance document metadata structure

* chore(content-manager): document unpublishing, improve publish status logic

---------

Co-authored-by: markkaylor <mark.kaylor@strapi.io>
2026-03-17 16:28:37 +00:00
Varun Chawla 45ea4b1c9b fix(content-manager): skip non-draftAndPublish relations in countDraftRelations (#25453)
* fix(content-manager): skip non-draftAndPublish relations in countDraftRelations

* fix(content-manager): add safety guard for undefined targetModel

* fix(content-manager): add hasDraftAndPublish guard to sumDraftCounts and getDeepPopulateDraftCount

---------

Co-authored-by: Ziyi Yuan <daydreamnation@live.com>
2026-03-16 11:35:24 +01:00
Adrien L 25ea375b1b fix(content-releases): publish in right order to preserve relations (#25551) 2026-03-06 10:06:50 +01:00
Ben Irvin 484b494b02 security(upload): improve mimetype detection for uploads (#25177) 2026-03-04 10:39:09 +01:00
markkaylor c1b52ed675 chore(upload): add import from url (#25496) 2026-02-27 09:33:24 +01:00
Ben Irvin 7786d4dcde fix: feature works and rename addBodyParams to addInputParams (#25552)
* fix: add params actually works

* fix: rename addInputParams

* test: fix register timing

* chore: update getstarted

* test(api): remove ai comment

* revert: do not merge in type unneccessarily

* revert: do not add type to route
2026-02-25 17:34:56 +01:00
Ben Irvin 79a590a581 security(feat): add strictParam, addQueryParams, addBodyParams (#25528) 2026-02-24 13:51:33 +01:00
Ziyi 062cd562d0 feat(): add hasPublishedVersion parameter for Document Service (#25292)
* feat(): add hasPublishedVersion parameter for REST API

* fix(): add tests and small fixes

* fix(): fix documentID being overwritten and add tests

* fix(): add filter function so it works for both root and nested queries

* feat(): add parameter for graphQL and tests

* fix(): only add agrs to schema when draft and published is enabled

* test(api): graphql and findfirst tests

* Update packages/core/utils/src/convert-query-params.ts

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* fix(): fix graphql nested relation issues, add tests

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2026-02-18 10:03:29 +00:00
Ben Irvin 6c7927ed75 test(api): remove the expiresin warnings (again) (#25440) 2026-02-13 11:01:14 +01:00
Ben Irvin aee79cbd27 test(api): use jwt default options instead of expiresIn (#25303) 2026-02-03 11:44:38 +01:00
markkaylor 8bcbfc344d fix(upload): content-api does not check file type restriction config (#25167) 2026-01-13 09:43:58 +01:00
Jamie Howard 16559ac3c8 fix(users-permissions): implement session revocation on password changes (#25168) 2026-01-13 09:41:45 +01:00
Jamie Howard 3d65d99e83 [Community PR] support httpOnly cookie for refresh token (#24954)
* fix(users-permissions): support httpOnly cookie for refresh token in /auth/refresh endpoint

* test(auth): reduce duplication in test

* test(auth): further duplication reduction
2026-01-09 09:10:20 +00:00
Araksya Gevorgyan e7ae51b01f feat(core): adding clear button to boolean toggle (#24836)
feat(core): adding clear button to boolean toggle
2025-12-02 17:33:05 +01:00
Dmitry Maklygin e20ea8327a fix: unable to customize cors settings in graphql plugin (#22852)
* fix: unable to customize cors settings in graphql plugin

* fix(graphql): restore CORS configuration support with Strapi 4 compatibility

---------

Co-authored-by: Dmitry Maklygin <dmitry.maklygin@toptal.com>
Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
2025-11-14 11:03:33 +02:00
mathildeleg 62638801ce fix: include locales to get last modified entries in widgets (#24647)
* fix: include locales to get last modified entries in widgets

* chore: add tests
2025-11-12 18:20:59 +01:00
markkaylor 366cfb5c4e chore(tests): add setupDatabaseReset utility (#24786) 2025-11-07 11:19:42 +01:00
Bassel Kanso 80ec2ee668 fix: prevent admins from deleting themselves (#24739) 2025-11-03 12:27:36 +02:00
mathildeleg c008ccd5d5 fix: pagination count on query with locale=* (#24699)
Modify the function called to query all locales to get the correct count
2025-10-30 08:59:30 +01:00
Adrien L 9c630ba433 fix: prefill non translatable fields when creating new document locale (#24659) 2025-10-29 15:50:50 +01:00
Jamie Howard 91f3ae970f enhancement: cookie security configuration (#24524) 2025-10-14 09:15:09 +02:00
Rémi de Juvigny 5e751dbf11 feat: ai generated image metadata (#24422)
* feat: chat

feat: apply changes
feat: integrate with ctb

feat: marker

chore: remove comment

feat: new chat

feat: copy message

feat: upload modal

feat: upload file

feat: errors and stop chat

chore: refactor transforms
chore: format relations

chore: chat title

chore: remove architect dependency

feat: empt state

chore: improve text area focus

* feat: chat imports

feat: resizable text area
fix: re add chat
chore: translations
feat: env vars

fix: minor chat issues

feat: feedback

fix: rebase

feat: import folder

feat: limits

feat: attachments dropzone

chore: file attachments cleanup
chore: track chat id

feat: figma import

fix :token

feat: figma token
fix: attribute status when chat makes updates

feat: image upload

* feat: staging integration

* chore: remove logs

* feat: use tool call result instead of annotation

* fix: invalid component uid

* chore: chat input focus ring

* fix: ui issues

* fix: default draft and publish and do not modify singular name

* fix: minor transforms

* fix: linting

* test(front): update snapshots

* chore: fix misplaced getstarted project schema

* chore: remove unused import

* security: validate exact path of host

* fix: define process better for playwright to work

* fix: process env in vite config for playwright

* chore: use production url

* feat(ctb): Tracking events for AI Chat interaction (#23731)

* feat(content-type-builder): WIP tracking events for chat interactions

* fix: typescript build errors

* fix: event name and build errors

* chore: send ai key with analytics

* chore: actually send licenseKey

* chore: send ailicensekey with groupproperties

* fix: didStartNewChat

* chore: track new chats

* feat: enhance attachment type management in AI chat components

* fix: update chat status handling in ChatProvider component

* feat: add optional aiLicenseKey to Strapi interface

---------

Co-authored-by: Jamie Howard <jhoward1994@gmail.com>

* refactor: remove didusersendmessage tracking event (#23777)

* fix: merge conflict

* fix: send projectId to AI server

* feat: add a enabled config for AI features (#24060)

* feat: add getAiToken endpoint (#24172)

* feat: add getAiToken route

* fix: change route name, remove project id

* fix: type issue and fix schema

* feat: retrieve ai token from frontend (#24226)

---------

Co-authored-by: Jamie Howard <jhoward1994@gmail.com>

* fix: use primary500 for links in ai chat

* chore: migrate to AI SDK v5 (#24252)

* fix: migrate code for v5

* t:wq

* feat: push schemas to ctb

* chore: remove old code

* chore: remove ts-no-check

* chore: fix comment

* fix: ai server logs (#24318)

* test(back): fix error log tests

---------

Co-authored-by: Marc Roig <marc12info@gmail.com>

* fix: configure ai ctb csp middleware without overriding user or default config

* future(upload): generate image metadata on file upload (#24365)

* chore: create aiMetadata service with isEnabled

* chore: extract getAiToken to service

* fix: unit test

* future(upload): generate metadata with ai

* fix: ts build

* fix: only send images to ai server

* test: add unit tests

* fix: unit test

---------

Co-authored-by: markkaylor <mark.kaylor@strapi.io>

* AI media lib bulk update (#24414)

* feat(packages): adding endpoint for bulk update

* feat(packages): linting

* feat(packages): adding tests

* feat(packages): cleanup

* feat: guided tour for ai ctb (#24411)

* feat(upload): adding aiMetadata into settings (#24468)

feat(upload): adding aiMetadata into settings

* feat: add AI upload modal (#24407)

* chore: create aiMetadata service with isEnabled

* chore: extract getAiToken to service

* fix: unit test

* future(upload): generate metadata with ai

* feat: add AI upload modal

* feat: add edit and delete to upload modal

* fix: remove sparkle icon on edit

* fix: add error handling

* chore: refactor ai upload modal reducer

* fix: catch ai token generation error

* chore: add useBulkEdit hook

* feat: connect to bulk edit endpoint

* fix: e2e test

* fix: ci in both ce and ee

---------

Co-authored-by: Rémi de Juvigny <remi.dejuvigny@strapi.io>
Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com>

* feat(upload): applying ai enabled logic for media library (#24486)

feat(upload): applying ai enabled logic for media library

* fix: sparkle icon

* fix: set ai server prod url

* fix: default config to enabled

* fix: cursor moving to the end when editing text

* fix: upload in the right folder

* fix: close modal when deleting last item

* chore: use STRAPI_AI_URL everywhere

* fix: bulk upload from frontend

* fix: restore sparkle icon on inputs

* fix: unit test ci

* feat(upload): generating metadata from thumbnail (#24515)

* feat(upload): generating metadata from thumbnail

* feat(upload): fixing linting issue

* feat(upload): fixing tests and addressiing feedback

* feat(upload): fixing lint

* fix: check for cms-ai entitlement

* fix: tests

* fix: race condition failing front unit tests

---------

Co-authored-by: Marc-Roig <marc12info@gmail.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Bassel Kanso <bassel.kanso@strapi.io>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Jamie Howard <jhoward1994@gmail.com>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
Co-authored-by: Ziyi <daydreamnation@live.com>
Co-authored-by: markkaylor <mark.kaylor@strapi.io>
Co-authored-by: Araksya Gevorgyan <31159659+araksyagevorgyan@users.noreply.github.com>
Co-authored-by: Adrien L <thewebsdoor@gmail.com>
2025-10-07 06:14:34 -04:00
Ben Irvin 723a2f0c62 fix: support auth.options config in sessions (#24460)
* fix: support auth.options config in sessions

* chore: fix lint

* feat(users-permissions): add jwt algorithm configuration

* refactor: remove deprecated admin.auth.options warnings

* test(token): add TypeScript error suppression for mock config in token tests

* feat(bootstrap): re-add warning for deprecated expiresIn option in session settings

---------

Co-authored-by: Jamie Howard <jhoward1994@gmail.com>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2025-09-29 16:58:18 +03:00
Jamie Howard d23f1485e5 feat: Advanced Session Configuration (#24346) 2025-09-23 12:04:29 +02:00
markkaylor 536eed0201 fix: database is corrupt with orphaned relations (#24316)
* fix: database is corrupt with orphaned relations

* chore: move script to document service and refactor

* fix: refactoring cleanup script

* fix: some improvements

* test(api): add unidirectional join table repair tests

* test(api): remove debug logs

* fix: orphaned relation nested compo (#24387)

---------

Co-authored-by: Bassel Kanso <basselkanso82@gmail.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2025-09-23 10:11:48 +02:00
Bassel Kanso a1da9b829e fix: syncing components in draft and publish relations (#24227)
Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2025-09-03 16:39:31 +02:00
Adrien L a8a53e3e7c fix: wrong count of non draftAndPublish entries (#24211) 2025-08-26 09:45:23 +02:00