Translate api option values from json bool to int (#2318)

v2.11
Maxime Besson 4 years ago
parent ac4866f767
commit acef2ed5c6
  1. 7
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Api/Common.pm

@ -121,11 +121,18 @@ sub _translateValueApiToConf {
unless ( ref($optionValue) eq "ARRAY" );
return join( ' ', @{$optionValue} );
}
# postLogoutRedirectUris is handled as an array
elsif ( $optionName eq 'postLogoutRedirectUris' ) {
die "postLogoutRedirectUris is not an array\n"
unless ( ref($optionValue) eq "ARRAY" );
return join( ' ', @{$optionValue} );
}
# Translate JSON booleans to integers
elsif ( JSON::is_bool($optionValue) ) {
return $optionValue ? 1 : 0;
}
else {
return $optionValue;
}

Loading…
Cancel
Save