Skip to content

Commit

Permalink
Merge pull request #5 from amplication/fix/saml-password-not-required
Browse files Browse the repository at this point in the history
Fix/saml-password-not-required
  • Loading branch information
abrl91 authored Apr 4, 2024
2 parents 29bc6c1 + c507e9c commit 64ed416
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ function handlePluginCases(plugins: PluginInstallation[]): DSGResourceData {

mockedEntities = mockedEntities.map((entity) => {
if (entity.name === authEntityName) {
const passwordField = entity.fields.find(
(field) => field.name === "password"
);
passwordField!.required = false;
entity.fields.push(sessionIdField);
}
return entity;
Expand Down
14 changes: 7 additions & 7 deletions test-cases/postgres-saml/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"name": "password",
"displayName": "Password",
"dataType": "Password",
"required": true,
"required": false,
"unique": false,
"searchable": true
},
Expand Down Expand Up @@ -1053,22 +1053,22 @@
"roles": [
{
"id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec40",
"createdAt": "2024-04-03T15:19:38.667Z",
"updatedAt": "2024-04-03T15:19:38.667Z",
"createdAt": "2024-04-04T09:26:01.508Z",
"updatedAt": "2024-04-04T09:26:01.508Z",
"displayName": "User",
"name": "user"
},
{
"id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec41",
"createdAt": "2024-04-03T15:19:38.667Z",
"updatedAt": "2024-04-03T15:19:38.667Z",
"createdAt": "2024-04-04T09:26:01.508Z",
"updatedAt": "2024-04-04T09:26:01.508Z",
"displayName": "Admin",
"name": "admin"
},
{
"id": "4da76cb1-46d0-4fd0-b81b-930c0ae5ec42",
"createdAt": "2024-04-03T15:19:38.667Z",
"updatedAt": "2024-04-03T15:19:38.667Z",
"createdAt": "2024-04-04T09:26:01.508Z",
"updatedAt": "2024-04-04T09:26:01.508Z",
"displayName": "Area Manager",
"name": "areaManager"
}
Expand Down

0 comments on commit 64ed416

Please sign in to comment.