#51182 Issue 50696 - Fix Allowed and Denied Ciphers lists - WebUI
Closed 2 years ago by spichugi. Opened 2 years ago by spichugi.
spichugi/389-ds-base i50696  into  master

@@ -184,10 +184,6 @@ 

          if (cmd.length > 6) {

              log_cmd("save_db_config", "Applying config change", cmd);

              let msg = "Successfully updated database configuration";

-             if (requireRestart) {

-                 msg = ("Successfully updated database configuration.  These " +

-                     "changes require the server to be restarted to take effect");

-             }

              cockpit

                      .spawn(cmd, {superuser: true, "err": "message"})

                      .done(content => {
@@ -197,6 +193,12 @@ 

                              "success",

                              msg

                          );

+                         if (requireRestart) {

+                             this.props.addNotification(

+                                 "warning",

+                                 `You must restart the Directory Server for these changes to take effect.`

+                             );

+                         }

                      })

                      .fail(err => {

                          let errMsg = JSON.parse(err);

@@ -726,10 +726,6 @@ 

          if (cmd.length > 7) {

              log_cmd("saveSuffixConfig", "Save suffix config", cmd);

              let msg = "Successfully updated suffix configuration";

-             if (requireRestart) {

-                 msg = ("Successfully updated suffix configuration.  These " +

-                     "changes require the server to be restarted to take effect");

-             }

              cockpit

                      .spawn(cmd, {superuser: true, "err": "message"})

                      .done(content => {
@@ -739,6 +735,12 @@ 

                              "success",

                              msg

                          );

+                         if (requireRestart) {

+                             this.props.addNotification(

+                                 "warning",

+                                 `You must restart the Directory Server for these changes to take effect.`

+                             );

+                         }

                      })

                      .fail(err => {

                          let errMsg = JSON.parse(err);

@@ -111,7 +111,11 @@ 

                  .done(() => {

                      this.props.addNotification(

                          "success",

-                         `Successfully set cipher preferences.  You must restart the Directory Server for these changes to take effect.`

+                         `Successfully set cipher preferences.`

+                     );

+                     this.props.addNotification(

+                         "warning",

+                         `You must restart the Directory Server for these changes to take effect.`

                      );

                      this.setState({

                          saving: false,
@@ -140,7 +144,7 @@ 

      }

  

      handleCipherChange (type, values) {

-         let availableCiphers = this.props.supportedCiphers.slice(0); // Copy array

+         let availableCiphers = this.state.availableCiphers.slice(0); // Copy array

          for (let i = 0; i < availableCiphers.length; i++) {

Ahh copy and paste error, nice catch

              for (let ci = 0; ci < values.length; ci++) {

                  if (availableCiphers[i] === values[ci]) {

@@ -412,7 +412,11 @@ 

                  .done(() => {

                      this.props.addNotification(

                          "success",

-                         `Successfully enabled security.  You must restart the server for this to take effect.`

+                         `Successfully enabled security.`

+                     );

+                     this.props.addNotification(

+                         "warning",

+                         `You must restart the Directory Server for these changes to take effect.`

                      );

                      this.setState({

                          securityEnabled: true,
@@ -448,7 +452,11 @@ 

                  .done(() => {

                      this.props.addNotification(

                          "success",

-                         `Successfully disabled security.  You must restart the server for this to take effect.`

+                         `Successfully disabled security.`

+                     );

+                     this.props.addNotification(

+                         "warning",

+                         `You must restart the Directory Server for these changes to take effect.`

                      );

                      this.setState({

                          securityEnabled: false,
@@ -540,7 +548,7 @@ 

  

          if (cmd.length > 5) {

              log_cmd("saveSecurityConfig", "Applying security config change", cmd);

-             let msg = "Successfully updated security configuration.  You must restart the Directory Server for these changes to take effect.";

+             let msg = "Successfully updated security configuration.";

  

              this.setState({

                  // Start the spinner
@@ -555,6 +563,10 @@ 

                              "success",

                              msg

                          );

+                         this.props.addNotification(

+                             "warning",

+                             `You must restart the Directory Server for these changes to take effect.`

+                         );

                          this.setState({

                              saving: false

                          });

Description: When we add a cipher to an Allowed list we should
not be allowed to add the same cipher to a Denied list.
Also, show a warning when we do an action which requires a restart.

https://pagure.io/389-ds-base/issue/50696

Reviewed by: ?

rebased onto 0f8605a

2 years ago

Pull-Request has been merged by spichugi

2 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4235

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

2 years ago