Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-1350

Add support to reset form values for complex attributes

    XMLWordPrintable

Details

    Description

      There are situations in forms, where complex attributes are displayed as an additional tab by using ComplexAttributeForm. The attributes contained in the complex attribute may be nillable=false, but the complex attribute itself is nillable=true

      One example is otp-credential-mapper or user-password-mapper in ldap-realm of elytron subsystem.

      Once the user adds values to otp-credential-mapper child attributes, then later wants to clear those values, it is not possible, because the "save" operation will validate the form input and will deny save, as the attributes are required. This way the user must use CLI to undefine the attribute.

      So, the proposed "reset" button, will call an "undefine-attribute" on this complex attribute. It must respect the same security constraints as the "edit" button.

      "otp-credential-mapper" => {
          "type" => OBJECT,
          "description" => "The credential mapping for OTP credential.",
          "expressions-allowed" => false,
          "required" => false,
          "nillable" => true,
          "value-type" => {
              "algorithm-from" => {
                  "type" => STRING,
                  "description" => "The name of the LDAP attribute of OTP algorithm.",
                  "expressions-allowed" => true,
                  "required" => true,
                  "nillable" => false,
                  "min-length" => 1L,
                  "max-length" => 2147483647L
              },
              "hash-from" => {
                  "type" => STRING,
                  "description" => "The name of the LDAP attribute of OTP hash function.",
                  "expressions-allowed" => true,
                  "required" => true,
                  "nillable" => false,
                  "min-length" => 1L,
                  "max-length" => 2147483647L
              },
              "seed-from" => {
                  "type" => STRING,
                  "description" => "The name of the LDAP attribute of OTP seed.",
                  "expressions-allowed" => true,
                  "required" => true,
                  "nillable" => false,
                  "min-length" => 1L,
                  "max-length" => 2147483647L
              },
              "sequence-from" => {
                  "type" => STRING,
                  "description" => "The name of the LDAP attribute of OTP sequence number.",
                  "expressions-allowed" => true,
                  "required" => true,
                  "nillable" => false,
                  "min-length" => 1L,
                  "max-length" => 2147483647L
              }
          }
      },
      
      

      /profile=full/subsystem=elytron/ldap-realm=*:read-resource-description

      Attachments

        Activity

          People

            cmiranda@redhat.com Claudio Miranda
            cmiranda@redhat.com Claudio Miranda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: