-
Notifications
You must be signed in to change notification settings - Fork 3
feat(301): third-party user management #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
junaidiqbalmoj
merged 80 commits into
master
from
feature/301-third-party-user-management
Jul 8, 2026
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
0908556
docs(301): add technical plan for third-party user management
github-actions[bot] 78e2420
feat(301): implement third-party user management
alexbottenberg 4280e12
fix: make confirmation panels full width and fix radio button visibility
alexbottenberg 49a3c65
test: add missing tests for third-party subscriptions page
alexbottenberg 920dadd
fix: ensure dotenv loads before app module imports in both servers
alexbottenberg ed19716
test: add third-party-user schema to schema discovery test
alexbottenberg 4d2071e
fix: use govukBackLink macro in third-party-users create summary page
alexbottenberg fc8906d
fix: remove unused translation object in postHandler
alexbottenberg cdd7232
fix: add missing dev and format scripts to third-party-user package
alexbottenberg 981ca0b
fix: add missing assets exclusion to third-party-user tsconfig
alexbottenberg 9a6fec3
fix: remove --env-file flag from web dev scripts to fix CI e2e startup
alexbottenberg 2acebb2
fix: E2E tests for third-party user management
ashwini-mv fc11784
refactor: rename delete/confirmation to delete/success
abottenberg e033c4d
refactor: move manage user page into [id]/manage subfolder
abottenberg 846bd82
refactor: move delete page into [id]/delete/confirmation subfolder
abottenberg 666375f
refactor: rename subscriptions/confirmation to subscriptions/success
abottenberg 29134ef
refactor: move subscriptions page into [id]/subscriptions/manage subf…
abottenberg c986810
chore: remove old files left over from folder restructures
abottenberg 250d1a1
fix: rename list_type to list_type_id as FK to list_types table
abottenberg 9ac8fa7
fix: use listTypeId integer FK when persisting third party subscriptions
abottenberg d5e7ab9
feat: add pip-ss-kv keyvault to preview template for identity secrets
abottenberg e010956
chore: update yarn.lock
abottenberg 7a2395e
chore: fix formatting in third-party-users [id] test
abottenberg 16bb104
fix: resolve listType to listTypeId in subscription audit log
abottenberg 0d2e998
fix: add getListTypeId function and use it in third-party-user service
abottenberg 812d6f4
fix: skip Key Vault fetch when credentials already in environment
abottenberg 850964f
fix: correct expected deleted count in cleanup test
abottenberg a7e0cda
revert: remove keyvault config from preview template
abottenberg 67ab76e
feat: add OAuth credentials configuration for third-party users
abottenberg c61ada1
fix: support legacy third-party users in OAuth config journey
abottenberg 2bf33a0
chore: add migration to drop third_party_subscription list_type fkey …
abottenberg 03bc637
feat: add OAuth credentials configuration for third-party users
abottenberg 2c2e830
fix: correct navigation links on OAuth config pages
abottenberg dfb7362
fix: remove extra blank line in server.ts to pass lint
abottenberg 9a7a9ba
fix: increase notification polling timeout for Puppeteer PDF generati…
abottenberg 0ff5a4d
fix: remove extra blank line in server.ts to pass lint
abottenberg 13b1418
fix: resolve Biome formatter errors in system-admin-pages
abottenberg 412a962
fix: correct postgresql setup.databases to use map type
abottenberg a48c13b
fix: rewrite manage-third-party-subscriptions page with per-list-type…
abottenberg aeb89df
Merge origin/master into feature/301-third-party-user-management
abottenberg 285f494
fix: resolve Biome lint errors in manage-third-party-subscriptions
abottenberg a9a5344
fix: regenerate yarn.lock after master merge
abottenberg 0f4fb09
fix: add third-party-user schema to consolidated postgres-prisma sche…
abottenberg 652e830
fix: revert postgresql setup.databases to list format
abottenberg ea21975
fix: correct postgresql setup.databases map format with explicit name…
abottenberg 7dd82af
revert: restore postgresql setup.databases to list format matching ma…
abottenberg 20e9129
fix: pre-populate oauth-config form with session values when returnin…
abottenberg 38af452
Merge master into feature/301-third-party-user-management
junaidiqbalmoj e0f45f0
refactor: apply new controller and template patterns across third-par…
junaidiqbalmoj a6ce0c3
fix: update launchdarkly lockfile entries to latest patch versions
junaidiqbalmoj 569a14b
fix: update third-party-user tests and controllers for res.locals loc…
junaidiqbalmoj 74fcc08
Merge branch 'master' into feature/301-third-party-user-management
junaidiqbalmoj ff4fbac
Register system-admin-pages lib routes to fix 404 on /third-party-use…
junaidiqbalmoj e608e51
Add Manage Third-Party Subscribers tile and rename pages from /third-…
junaidiqbalmoj 51de853
feat: reimplement manage-third-party-subscriptions with global sensit…
junaidiqbalmoj 007d3bb
feat: prevent duplicate third party user names on creation
junaidiqbalmoj f52d223
fix: remove duplicate dashboard tile pointing to /third-party-users
junaidiqbalmoj 7f225d8
fix: update third-party-subscribers pages to use subscriber terminology
junaidiqbalmoj 0ee8696
fix: manage subscriber page layout and duplicate check on create
junaidiqbalmoj 6e89bc6
fix: widen manage subscriber column so all three buttons fit on one line
junaidiqbalmoj d8f4b98
fix: remove client secret row from OAuth config summary page
junaidiqbalmoj 364a66c
fix: remove trailing comma and blank line causing Nunjucks parse erro…
junaidiqbalmoj b8ea8d1
fix: remove cancel button from OAuth config page
junaidiqbalmoj b034f6d
feat: delete Key Vault secrets when deleting a third-party subscriber
junaidiqbalmoj 485867e
chore: skip third-party user management E2E tests until system admin …
junaidiqbalmoj 0c74664
fix: resolve test failures and lint issues for third-party subscriber…
junaidiqbalmoj 52bed4d
chore: merge master into feature/301-third-party-user-management
junaidiqbalmoj 3cb7cf9
fix: regenerate yarn.lock after merge conflict resolution
junaidiqbalmoj 0d6019f
fix: resolve CI build and test failures
junaidiqbalmoj c9f5bf2
fix: resolve TypeScript TS2345/TS18048 errors in third-party-subscrib…
junaidiqbalmoj 5747975
fix: remove dotenv dependency from server.ts files
junaidiqbalmoj 4f14502
chore: merge master into feature/301-third-party-user-management
junaidiqbalmoj b964f42
fix: correct audit action mock and lint formatting in subscriptions test
junaidiqbalmoj f643ecc
chore: merge master into feature/301-third-party-user-management
junaidiqbalmoj 0e8edb2
feat(301): migrate third party user/subscription IDs to UUID and fix …
junaidiqbalmoj aa1c793
chore: resolve merge conflicts with master and regenerate Prisma client
junaidiqbalmoj 078abca
chore: stage remaining merge changes from master
junaidiqbalmoj 4971798
revert: remove unintended changes to run.sh, CLAUDE.md, and sonar-pro…
junaidiqbalmoj c104e12
chore: resolve merge conflicts with master and regenerate Prisma client
junaidiqbalmoj c4d70f6
update delete success width
alao-daniel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
27 changes: 27 additions & 0 deletions
27
apps/postgres/prisma/migrations/20260318000000_add_third_party_user/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| -- CreateTable | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oauth confirmation table is missing completly. |
||
| CREATE TABLE "third_party_user" ( | ||
| "id" TEXT NOT NULL, | ||
| "name" VARCHAR(255) NOT NULL, | ||
| "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
|
||
| CONSTRAINT "third_party_user_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "third_party_subscription" ( | ||
| "id" TEXT NOT NULL, | ||
| "third_party_user_id" TEXT NOT NULL, | ||
| "list_type_id" INTEGER NOT NULL, | ||
| "sensitivity" VARCHAR(20) NOT NULL, | ||
|
|
||
| CONSTRAINT "third_party_subscription_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE UNIQUE INDEX "third_party_subscription_third_party_user_id_list_type_id_key" ON "third_party_subscription"("third_party_user_id", "list_type_id"); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "third_party_subscription" ADD CONSTRAINT "third_party_subscription_third_party_user_id_fkey" FOREIGN KEY ("third_party_user_id") REFERENCES "third_party_user"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "third_party_subscription" ADD CONSTRAINT "third_party_subscription_list_type_id_fkey" FOREIGN KEY ("list_type_id") REFERENCES "list_types"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- DropForeignKey | ||
| ALTER TABLE "third_party_subscription" DROP CONSTRAINT "third_party_subscription_list_type_id_fkey"; |
7 changes: 7 additions & 0 deletions
7
apps/postgres/prisma/migrations/20260522120000_readd_third_party_secret/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| -- CreateTable | ||
| CREATE TABLE "third_party_secret" ( | ||
| "name" VARCHAR(255) NOT NULL, | ||
| "value" VARCHAR(1000) NOT NULL, | ||
|
|
||
| CONSTRAINT "third_party_secret_pkey" PRIMARY KEY ("name") | ||
| ); |
23 changes: 23 additions & 0 deletions
23
apps/postgres/prisma/migrations/20260701000000_change_third_party_ids_to_uuid/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| -- Change third_party_user and third_party_subscription IDs from TEXT (CUID) to UUID | ||
| -- Existing rows are cleared as they have non-UUID IDs that cannot be migrated | ||
| TRUNCATE TABLE "third_party_subscription", "third_party_user" CASCADE; | ||
|
|
||
| ALTER TABLE "third_party_subscription" DROP CONSTRAINT IF EXISTS "third_party_subscription_third_party_user_id_fkey"; | ||
| ALTER TABLE "third_party_subscription" DROP CONSTRAINT IF EXISTS "third_party_subscription_list_type_id_fkey"; | ||
|
|
||
| ALTER TABLE "third_party_user" | ||
| ALTER COLUMN "id" DROP DEFAULT, | ||
| ALTER COLUMN "id" SET DATA TYPE UUID USING gen_random_uuid(), | ||
| ALTER COLUMN "id" SET DEFAULT gen_random_uuid(); | ||
|
|
||
| ALTER TABLE "third_party_subscription" | ||
| ALTER COLUMN "id" DROP DEFAULT, | ||
| ALTER COLUMN "id" SET DATA TYPE UUID USING gen_random_uuid(), | ||
| ALTER COLUMN "id" SET DEFAULT gen_random_uuid(), | ||
| ALTER COLUMN "third_party_user_id" SET DATA TYPE UUID USING gen_random_uuid(); | ||
|
|
||
| ALTER TABLE "third_party_subscription" ADD CONSTRAINT "third_party_subscription_third_party_user_id_fkey" | ||
| FOREIGN KEY ("third_party_user_id") REFERENCES "third_party_user"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| ALTER TABLE "third_party_subscription" ADD CONSTRAINT "third_party_subscription_list_type_id_fkey" | ||
| FOREIGN KEY ("list_type_id") REFERENCES "list_types"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
8 changes: 8 additions & 0 deletions
8
apps/postgres/prisma/migrations/20260701115926_third_party_subscription/migration.sql
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| -- DropForeignKey | ||
| ALTER TABLE "third_party_subscription" DROP CONSTRAINT "third_party_subscription_list_type_id_fkey"; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "third_party_subscription" ALTER COLUMN "id" DROP DEFAULT; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE "third_party_user" ALTER COLUMN "id" DROP DEFAULT; |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Paths with spaces will break due to word-splitting.
The
$TS_FILESvariable is built by concatenation and later expanded unquoted (lines 63, 67). Filenames containing spaces will be incorrectly split.🛠️ Suggested fix using an array
Then update the biome invocations: