diff options
author | enahum <nahumhbl@gmail.com> | 2016-07-20 17:01:10 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-07-20 13:01:10 -0800 |
commit | 86d496c9b72c97b905bfc23d26556032c6fa1d05 (patch) | |
tree | 5750d849c44f62d3269169e80fbb69e86e92867d /webapp/components/admin_console | |
parent | b0090214ef4e550b1e82c6f8cb5f717bfefe358b (diff) | |
download | chat-86d496c9b72c97b905bfc23d26556032c6fa1d05.tar.gz chat-86d496c9b72c97b905bfc23d26556032c6fa1d05.tar.bz2 chat-86d496c9b72c97b905bfc23d26556032c6fa1d05.zip |
PLT-3629 fix uploading certificates if the files in the config do not exists (#3634)
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r-- | webapp/components/admin_console/saml_settings.jsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webapp/components/admin_console/saml_settings.jsx b/webapp/components/admin_console/saml_settings.jsx index ae6f3e169..9fb78f472 100644 --- a/webapp/components/admin_console/saml_settings.jsx +++ b/webapp/components/admin_console/saml_settings.jsx @@ -70,6 +70,26 @@ export default class SamlSettings extends AdminSettings { }; } + componentWillMount() { + Client.samlCertificateStatus( + (data) => { + const files = {}; + if (!data.IdpCertificateFile) { + files.idpCertificateFile = ''; + } + + if (!data.PublicCertificateFile) { + files.publicCertificateFile = ''; + } + + if (!data.PrivateKeyFile) { + files.privateKeyFile = ''; + } + this.setState(files); + } + ); + } + uploadCertificate(id, file, callback) { Client.uploadCertificateFile( file, |