Skip to content

Commit

Permalink
not sending extra settings on selfhosted deployments (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer authored Dec 11, 2023
1 parent c3ba026 commit a71389a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/views/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,21 +481,24 @@ export const Settings = () => {
};

const createAccountToSave = (values: FormAccount): Account => {
return {
let accountToSave = {
id: formAccount.id,
settings: {
peer_login_expiration: expiresInToSeconds(
values.peer_login_expiration_formatted
values.peer_login_expiration_formatted
),
peer_login_expiration_enabled: values.peer_login_expiration_enabled,
jwt_groups_enabled: jwtGroupsEnabled,
jwt_groups_claim_name: jwtGroupsClaimName,
groups_propagation_enabled: groupsPropagationEnabled,
extra: {
peer_approval_enabled: values.peer_approval_enabled
}
},
} as Account;
if (isNetBirdHosted() || isLocalDev()) {
accountToSave.settings.extra = {
peer_approval_enabled: values.peer_approval_enabled
}
}
return accountToSave;
};

const confirmSave = (newValues: FormAccount) => {
Expand Down

0 comments on commit a71389a

Please sign in to comment.