mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-01-26 01:21:04 +00:00
Include all settings in put request to prevent overwrite (#405)
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user