Skip to content

Commit

Permalink
Include all settings in put request to prevent overwrite (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
heisbrot authored Jul 31, 2024
1 parent 121778c commit 650496f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/modules/settings/AuthenticationTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default function AuthenticationTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
peer_login_expiration_enabled: loginExpiration,
peer_login_expiration: loginExpiration ? expiration : 86400,
extra: {
Expand Down
4 changes: 1 addition & 3 deletions src/modules/settings/GroupsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,8 @@ export default function GroupsTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
groups_propagation_enabled: groupsPropagation,
peer_login_expiration_enabled:
account.settings.peer_login_expiration_enabled,
peer_login_expiration: account.settings.peer_login_expiration,
jwt_groups_enabled: jwtGroupSync,
jwt_groups_claim_name: isEmpty(jwtGroupsClaimName)
? undefined
Expand Down
9 changes: 1 addition & 8 deletions src/modules/settings/PermissionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@ export default function PermissionsTab({ account }: Props) {
.put({
id: account.id,
settings: {
...account.settings,
regular_users_view_blocked: userViewBlocked,
groups_propagation_enabled:
account.settings?.groups_propagation_enabled,
peer_login_expiration_enabled:
account.settings?.peer_login_expiration_enabled,
peer_login_expiration: account.settings?.peer_login_expiration,
jwt_groups_enabled: account.settings?.jwt_groups_enabled,
jwt_groups_claim_name: account.settings?.jwt_groups_claim_name,
jwt_allow_groups: account.settings?.jwt_allow_groups,
},
})
.then(() => {
Expand Down

0 comments on commit 650496f

Please sign in to comment.