diff --git a/docker/scripts/mongodb/10-cdp-user-service-backend-users.js b/docker/scripts/mongodb/10-cdp-user-service-backend-users.js index d191891..f0279c9 100644 --- a/docker/scripts/mongodb/10-cdp-user-service-backend-users.js +++ b/docker/scripts/mongodb/10-cdp-user-service-backend-users.js @@ -15,6 +15,9 @@ db.users.updateOne( createdAt: "2023-10-26T12:51:00.028Z", updatedAt: "2023-10-26T12:51:00.028Z", teams: ["aabe63e7-87ef-4beb-a596-c810631fc474"], + scopes: [ + new ObjectId("6750708d454fcbbcc1568154") + ], }, }, { upsert: true } @@ -35,6 +38,7 @@ db.users.updateOne( createdAt: "2024-11-11T13:51:00.028Z", updatedAt: "2024-11-12T13:24:00.028Z", teams: ["44c7fa74-40e7-470d-a18a-b78a60bbef8e"], + scopes:[] }, }, { upsert: true } diff --git a/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js b/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js index 51b23d7..e35d272 100644 --- a/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js +++ b/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js @@ -1,5 +1,44 @@ db = db.getSiblingDB("cdp-user-service-backend"); +db.scopes.updateOne( + { + value: "externalTest" + }, + { + $setOnInsert: { + _id: new ObjectId("674def9d30093e3a3aa49d35"), + userId: "90552794-0613-4023-819a-512aa9d40023", + value: "externalTest", + teams: [ + "aabe63e7-87ef-4beb-a596-c810631fc474" + ], + createdAt: "2024-12-02T17:34:21.295Z", + updatedAt: "2024-12-02T17:34:21.295Z" + }, + }, + { upsert: true } +); + +db.scopes.updateOne( + { + value: "breakglass" + }, + { + $setOnInsert: { + _id: new ObjectId("6750708d454fcbbcc1568154"), + userId: "90552794-0613-4023-819a-512aa9d40023", + value: "breakGlass", + teams: [ + ], + createdAt: "2024-12-02T17:34:21.295Z", + updatedAt: "2024-12-02T17:34:21.295Z" + }, + + }, + { upsert: true } +); + + db.teams.updateOne( { name: "Platform", @@ -11,6 +50,9 @@ db.teams.updateOne( description: "The team that runs the platform", github: "cdp-platform", users: ["90552794-0613-4023-819a-512aa9d40023"], + scopes: [ + new ObjectId("674def9d30093e3a3aa49d35") + ], createdAt: "2023-10-26T12:51:00.028Z", updatedAt: "2023-10-26T12:51:00.028Z", }, @@ -19,19 +61,20 @@ db.teams.updateOne( ); db.teams.updateOne( - { + { + name: "TenantTeam1", + }, + { + $setOnInsert: { + _id: "44c7fa74-40e7-470d-a18a-b78a60bbef8e", name: "TenantTeam1", + description: "A test team", + github: "cdp-tenant-1", + users: [], + scopes: [], + createdAt: "2024-10-26T12:51:00.028Z", + updatedAt: "2024-10-26T12:55:00.028Z", }, - { - $setOnInsert: { - _id: "44c7fa74-40e7-470d-a18a-b78a60bbef8e", - name: "TenantTeam1", - description: "A test team", - github: "cdp-tenant-1", - users: [], - createdAt: "2024-10-26T12:51:00.028Z", - updatedAt: "2024-10-26T12:55:00.028Z", - }, - }, - { upsert: true } + }, + { upsert: true } );