License entitlement 2_final#27396
Merged
Merged
Conversation
…irectus into license-entitlement-2
ComfortablyCoding
approved these changes
May 6, 2026
gaetansenn
pushed a commit
that referenced
this pull request
May 7, 2026
* use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * fix flows * implement resolvers * no mo try catch
gaetansenn
added a commit
that referenced
this pull request
May 13, 2026
* feat: add licit jwt mock * fix: concurrency lock * refactor: add types and update usage * feat: add lazy addons hydration to license store * fix: re-apply concurrency lock fix on license manager * License management settings page (#27368) * feat: add license API types and route mocks * fix: remove cache * feat: add sdk part * refactor: update types according to notion feebacks * feat: add front-end foundation * feat: add scenario / error mock param from sdk * wip licensing settings * deactivate modal confirm * fix * fix: align license page with new entitlements format and store API * split license section * extract format time frame in its own util * feat: implement customLLM screen * Apply suggestion from @gaetansenn * refactor: update settings and store --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * Add license gating UI on Custom LLM settings (#27379) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * fix: use override before default * Add license gating on access policies custom rules (#27390) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * feat: add license gating on access policies custom rules * Revert "feat: implement customLLM screen" This reverts commit fa5c49f. * fix: conflict * feat: skip license store hydration for non-admin users * Add revision and activity history license notice (#27399) * feat: add revision and activity history license notice * refactor: simplify formatTimeframe to use days only * fix: revision order license * fix: activity feed licesne margin * License mock (#27392) * add basic license mock server * start updating test suite * start working on license activation test * better error reporting * continue testing * continue on tests * remove invalid files * Fix license initialization * first working test 🥳 * rename entitlement setLicense to setEntitlements * cleanup endpoints * add license assertions * cleanup * account for provided key entitlements in pending resolution * add public_url change handling for refresh * account for deactivate state in pendingResolution * various fixes * License entitlement 2 (#27386) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * License entitlement 2_final (#27396) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * fix flows * implement resolvers * no mo try catch * cleanup after entitlement improvements * update license-mock * complete mock server * feat(e2e): add beforeApi hook * test(e2e): surface db connection * tests(e2e): correctly build knex connection * tests(e2e): add g and d cases * fix getschema on clean bootstrap * fix sandbox and e2e tests * update tests * do not restrict preview behind admin * no bypass for manage addons on init * adjust setup completed and license payloads * fix license token column type and unify the 2 migrations * add license and key generation * test(license-mock): rename to mock-license-server * fix sb * update test * License entitlement 3 (#27408) * fixing entitlement initialization * move blocking modal that always triggers * manager tweaks * dont prevent user creation * fix history filter calculations * integrate seat enforcement with existing limit checks * remove debug code * mo verify * fix activity history filter and added basic query cache * fix circular import issue with services * add checkAll feature and fix feature flags * bring mock server up to spec * cleanup mock server * add grace period utility * change mock server version to date based * add overage billed to meta * bring core up to spec * bring tests up to spec * move lib to utils * utilize entitlement getActiveSeats for resolution * add required claim to mock server * refactor: use e2e logic * refactor: clean up code * refactor: clean up mocks * License Onboarding flow (#27334) * License onboarding (#27380) * align frontend with API schema and fix setupCompleted derivation --------- Co-authored-by: HZooly <torzuoli.hugo@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * refactor: merge conflicts * Include LICENSE_TOKEN in licenseInEnv check (#27416) * fix: include LICENSE_TOKEN in licenseInEnv check * update project owner banner rule --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * feat: show deactivated collections in data model (#27421) Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> * improve pendingResolution * fix folder counting * update `display_powered_by` value to spec * fix collection enforcement * fix for ma best fiend juda * cleanup * add todo for error handling for setup license activate * Support lock state and refactor state commit (#27419) * support lock state and refactor state commit * dont call getStatus on options.status * License entitlement 4 (#27420) * fix collections resolution * basic collection entitlements test * rename for consistency * oops, invert check functions for entitlements * make sure limits are set * fix assertAll * add excpetion back in * skip not registerd keys * update token on addon quantity change * tests(mls): add license version requirement enforcement * add knex for getSchema * moar knex issues * enforce port for api * add missing set source for db data * more port fixes * refactor initialize test structure * refactor: revert mock * lint: clean up * feat: add static license keys * Amend how seats are computed against entitlements (#27431) * Amend computation again (#27432) * Amend how seats are computed against entitlements * Fix error * Tighten license onboarding types and gate project owner info (#27433) * Add license limit modal and use for seat and collection gating (#27372) * collection limit modal * tests * share licens guard code via composable * refactor * rework user limit modal to appear on save * rework again based on latest spec * change status to deactivated * simplify save to deactivated status * revert more changes * change back to error code that will be added later * use named route instead of hard-coded path * placeholder for settings page * I lost the vote * refactor: add todo * Revert "refactor: add todo" This reverts commit 4fd3b26. * Collections remaining component and logic (#27383) * collections remaining component and logic * remove hard coded value used for testing --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * max capacity modal (#27393) * minor fixes * show collectionsRemaining when 10 or less left for team and enterprise * avoid using specific plan types in conditions * cleanup * adapt to api changes plus feedback * cleanup and minor fixes * change alert text color to match figma * Frontend gating for flows (#27430) * frontend gating for flows * change license-limit-modal name to entitlement-limit-modal * Update app/src/views/private/components/license/entitlement-remaining.vue --------- Co-authored-by: Alex Gaillard <alex@directus.io> * Import inactive-license-expired string from constant --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> * fix(license manager): pending resolution pushing no violation * add remaining initialize tests * move admin under its own route * move getLicense under manager * fix(license manager): explit check for license key * fix(mls): JWT exp should be 7 days from issue * Merge with license branch * Move entitlement remaining to actions:prepend slot * drop dead onboarding code and fix breadcrumb import * restore owner_complete --------- Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> Co-authored-by: Nitwel <mail@nitwel.de> Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Brainslug <tim@brainslug.nl> Co-authored-by: Alex Gaillard <alex@directus.io> Co-authored-by: Rob Luton <rob.luton@gmail.com>
AlexGaillard
added a commit
that referenced
this pull request
May 13, 2026
* feat: add licit jwt mock * fix: concurrency lock * refactor: add types and update usage * feat: add lazy addons hydration to license store * fix: re-apply concurrency lock fix on license manager * License management settings page (#27368) * feat: add license API types and route mocks * fix: remove cache * feat: add sdk part * refactor: update types according to notion feebacks * feat: add front-end foundation * feat: add scenario / error mock param from sdk * wip licensing settings * deactivate modal confirm * fix * fix: align license page with new entitlements format and store API * split license section * extract format time frame in its own util * feat: implement customLLM screen * Apply suggestion from @gaetansenn * refactor: update settings and store --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * Add license gating UI on Custom LLM settings (#27379) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * fix: use override before default * Add license gating on access policies custom rules (#27390) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * feat: add license gating on access policies custom rules * Revert "feat: implement customLLM screen" This reverts commit fa5c49f. * fix: conflict * feat: skip license store hydration for non-admin users * Add revision and activity history license notice (#27399) * feat: add revision and activity history license notice * refactor: simplify formatTimeframe to use days only * fix: revision order license * fix: activity feed licesne margin * License mock (#27392) * add basic license mock server * start updating test suite * start working on license activation test * better error reporting * continue testing * continue on tests * remove invalid files * Fix license initialization * first working test 🥳 * rename entitlement setLicense to setEntitlements * cleanup endpoints * add license assertions * cleanup * account for provided key entitlements in pending resolution * add public_url change handling for refresh * account for deactivate state in pendingResolution * various fixes * License entitlement 2 (#27386) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * License entitlement 2_final (#27396) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * fix flows * implement resolvers * no mo try catch * cleanup after entitlement improvements * update license-mock * complete mock server * feat(e2e): add beforeApi hook * test(e2e): surface db connection * tests(e2e): correctly build knex connection * tests(e2e): add g and d cases * fix getschema on clean bootstrap * fix sandbox and e2e tests * update tests * do not restrict preview behind admin * no bypass for manage addons on init * adjust setup completed and license payloads * fix license token column type and unify the 2 migrations * add license and key generation * test(license-mock): rename to mock-license-server * fix sb * update test * License entitlement 3 (#27408) * fixing entitlement initialization * move blocking modal that always triggers * manager tweaks * dont prevent user creation * fix history filter calculations * integrate seat enforcement with existing limit checks * remove debug code * mo verify * fix activity history filter and added basic query cache * fix circular import issue with services * add checkAll feature and fix feature flags * bring mock server up to spec * cleanup mock server * add grace period utility * change mock server version to date based * add overage billed to meta * bring core up to spec * bring tests up to spec * move lib to utils * utilize entitlement getActiveSeats for resolution * add required claim to mock server * refactor: use e2e logic * refactor: clean up code * refactor: clean up mocks * License Onboarding flow (#27334) * License onboarding (#27380) * align frontend with API schema and fix setupCompleted derivation --------- Co-authored-by: HZooly <torzuoli.hugo@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * refactor: merge conflicts * Include LICENSE_TOKEN in licenseInEnv check (#27416) * fix: include LICENSE_TOKEN in licenseInEnv check * update project owner banner rule --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * feat: show deactivated collections in data model (#27421) Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> * improve pendingResolution * fix folder counting * update `display_powered_by` value to spec * fix collection enforcement * fix for ma best fiend juda * cleanup * add todo for error handling for setup license activate * Support lock state and refactor state commit (#27419) * support lock state and refactor state commit * dont call getStatus on options.status * License entitlement 4 (#27420) * fix collections resolution * basic collection entitlements test * rename for consistency * oops, invert check functions for entitlements * make sure limits are set * fix assertAll * add excpetion back in * skip not registerd keys * update token on addon quantity change * tests(mls): add license version requirement enforcement * add knex for getSchema * moar knex issues * enforce port for api * add missing set source for db data * more port fixes * refactor initialize test structure * refactor: revert mock * lint: clean up * feat: add static license keys * Amend how seats are computed against entitlements (#27431) * Amend computation again (#27432) * Amend how seats are computed against entitlements * Fix error * Tighten license onboarding types and gate project owner info (#27433) * Add license limit modal and use for seat and collection gating (#27372) * collection limit modal * tests * share licens guard code via composable * refactor * rework user limit modal to appear on save * rework again based on latest spec * change status to deactivated * simplify save to deactivated status * revert more changes * change back to error code that will be added later * use named route instead of hard-coded path * placeholder for settings page * I lost the vote * refactor: add todo * Revert "refactor: add todo" This reverts commit 4fd3b26. * Collections remaining component and logic (#27383) * collections remaining component and logic * remove hard coded value used for testing --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * max capacity modal (#27393) * minor fixes * show collectionsRemaining when 10 or less left for team and enterprise * avoid using specific plan types in conditions * cleanup * adapt to api changes plus feedback * cleanup and minor fixes * change alert text color to match figma * Frontend gating for flows (#27430) * frontend gating for flows * change license-limit-modal name to entitlement-limit-modal * Update app/src/views/private/components/license/entitlement-remaining.vue --------- Co-authored-by: Alex Gaillard <alex@directus.io> * Import inactive-license-expired string from constant --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> * fix(license manager): pending resolution pushing no violation * add remaining initialize tests * move admin under its own route * move getLicense under manager * fix(license manager): explit check for license key * fix(mls): JWT exp should be 7 days from issue * Merge with license branch * Move entitlement remaining to actions:prepend slot * drop dead onboarding code and fix breadcrumb import * restore owner_complete * Hide translations button on translation interface * Add readonly and notice to AI settings * Add helper function for license store boolean values * Update tests --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> Co-authored-by: Nitwel <mail@nitwel.de> Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Brainslug <tim@brainslug.nl> Co-authored-by: Rob Luton <rob.luton@gmail.com>
gaetansenn
added a commit
that referenced
this pull request
May 15, 2026
* feat: add licit jwt mock * fix: concurrency lock * refactor: add types and update usage * feat: add lazy addons hydration to license store * fix: re-apply concurrency lock fix on license manager * License management settings page (#27368) * feat: add license API types and route mocks * fix: remove cache * feat: add sdk part * refactor: update types according to notion feebacks * feat: add front-end foundation * feat: add scenario / error mock param from sdk * wip licensing settings * deactivate modal confirm * fix * fix: align license page with new entitlements format and store API * split license section * extract format time frame in its own util * feat: implement customLLM screen * Apply suggestion from @gaetansenn * refactor: update settings and store --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * Add license gating UI on Custom LLM settings (#27379) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * Apply suggestion from @gaetansenn * fix: use override before default * Add license gating on access policies custom rules (#27390) * feat: implement customLLM screen * Apply suggestion from @gaetansenn * feat: add license gating on access policies custom rules * Revert "feat: implement customLLM screen" This reverts commit fa5c49f. * fix: conflict * feat: skip license store hydration for non-admin users * Add revision and activity history license notice (#27399) * feat: add revision and activity history license notice * refactor: simplify formatTimeframe to use days only * fix: revision order license * fix: activity feed licesne margin * License mock (#27392) * add basic license mock server * start updating test suite * start working on license activation test * better error reporting * continue testing * continue on tests * remove invalid files * Fix license initialization * first working test 🥳 * rename entitlement setLicense to setEntitlements * cleanup endpoints * add license assertions * cleanup * account for provided key entitlements in pending resolution * add public_url change handling for refresh * account for deactivate state in pendingResolution * various fixes * License entitlement 2 (#27386) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * License entitlement 2_final (#27396) * use directus errors * fix custom rule entitlement and enforce create/update * basic flows enforcement * add flows and update collections * add collection status for excluding * simple collection exclusion checks * fix flows * implement resolvers * no mo try catch * cleanup after entitlement improvements * update license-mock * complete mock server * feat(e2e): add beforeApi hook * test(e2e): surface db connection * tests(e2e): correctly build knex connection * tests(e2e): add g and d cases * fix getschema on clean bootstrap * fix sandbox and e2e tests * update tests * do not restrict preview behind admin * no bypass for manage addons on init * adjust setup completed and license payloads * fix license token column type and unify the 2 migrations * add license and key generation * test(license-mock): rename to mock-license-server * fix sb * update test * License entitlement 3 (#27408) * fixing entitlement initialization * move blocking modal that always triggers * manager tweaks * dont prevent user creation * fix history filter calculations * integrate seat enforcement with existing limit checks * remove debug code * mo verify * fix activity history filter and added basic query cache * fix circular import issue with services * add checkAll feature and fix feature flags * bring mock server up to spec * cleanup mock server * add grace period utility * change mock server version to date based * add overage billed to meta * bring core up to spec * bring tests up to spec * move lib to utils * utilize entitlement getActiveSeats for resolution * add required claim to mock server * refactor: use e2e logic * refactor: clean up code * refactor: clean up mocks * License Onboarding flow (#27334) * License onboarding (#27380) * align frontend with API schema and fix setupCompleted derivation --------- Co-authored-by: HZooly <torzuoli.hugo@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * refactor: merge conflicts * Include LICENSE_TOKEN in licenseInEnv check (#27416) * fix: include LICENSE_TOKEN in licenseInEnv check * update project owner banner rule --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * feat: show deactivated collections in data model (#27421) Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> * improve pendingResolution * fix folder counting * update `display_powered_by` value to spec * fix collection enforcement * fix for ma best fiend juda * cleanup * add todo for error handling for setup license activate * Support lock state and refactor state commit (#27419) * support lock state and refactor state commit * dont call getStatus on options.status * License entitlement 4 (#27420) * fix collections resolution * basic collection entitlements test * rename for consistency * oops, invert check functions for entitlements * make sure limits are set * fix assertAll * add excpetion back in * skip not registerd keys * update token on addon quantity change * tests(mls): add license version requirement enforcement * add knex for getSchema * moar knex issues * enforce port for api * add missing set source for db data * more port fixes * refactor initialize test structure * refactor: revert mock * lint: clean up * feat: add static license keys * wip resolution modal * Amend how seats are computed against entitlements (#27431) * Amend computation again (#27432) * Amend how seats are computed against entitlements * Fix error * Tighten license onboarding types and gate project owner info (#27433) * Add license limit modal and use for seat and collection gating (#27372) * collection limit modal * tests * share licens guard code via composable * refactor * rework user limit modal to appear on save * rework again based on latest spec * change status to deactivated * simplify save to deactivated status * revert more changes * change back to error code that will be added later * use named route instead of hard-coded path * placeholder for settings page * I lost the vote * refactor: add todo * Revert "refactor: add todo" This reverts commit 4fd3b26. * Collections remaining component and logic (#27383) * collections remaining component and logic * remove hard coded value used for testing --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> * max capacity modal (#27393) * minor fixes * show collectionsRemaining when 10 or less left for team and enterprise * avoid using specific plan types in conditions * cleanup * adapt to api changes plus feedback * cleanup and minor fixes * change alert text color to match figma * Frontend gating for flows (#27430) * frontend gating for flows * change license-limit-modal name to entitlement-limit-modal * Update app/src/views/private/components/license/entitlement-remaining.vue --------- Co-authored-by: Alex Gaillard <alex@directus.io> * Import inactive-license-expired string from constant --------- Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com> Co-authored-by: Alex Gaillard <alex@directus.io> * fix(license manager): pending resolution pushing no violation * add remaining initialize tests * move admin under its own route * move getLicense under manager * fix(license manager): explit check for license key * fix(mls): JWT exp should be 7 days from issue * Merge with license branch * Move entitlement remaining to actions:prepend slot * drop dead onboarding code and fix breadcrumb import * refactor: udpdate store * restore owner_complete * refactor: clean up code * grace-period modal * feat: handle locked license logic * fix: rename collection deactivation and apply locked to app * resolution modal ui * modal footer * refactor: handle no resolution case * refactor: adapt according to severity * refactor: route license activate/update through licenseStore * add missing translation * sync lock allowed list between router an app * make grace warning dismiss work, clear on grace exit --------- Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com> Co-authored-by: Nitwel <mail@nitwel.de> Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> Co-authored-by: Brainslug <br41nslug@users.noreply.github.com> Co-authored-by: Brainslug <tim@brainslug.nl> Co-authored-by: Alex Gaillard <alex@directus.io> Co-authored-by: Rob Luton <rob.luton@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
What's changed:
Potential Risks / Drawbacks
Tested Scenarios
Review Notes / Questions
Checklist
Fixes #<num>