Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5454

User profile page does not support boolean attributes on managed objects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 3.1.0, OpenIDM 4.5.0
    • Fix Version/s: OpenIDM 5.0.0
    • Component/s: Module - Web UI
    • Environment:
      Standard IDM 3.1.0 using the sample1 configuration

      Description

      Steps to reproduce:

      1. Setup standard OpenIDM with Sample 1 config.

      2. Create a user with a boolean attribute. Here I've done isCool.

      curl --request POST -H "Content-Type: application/json" -H "X-OpenIDM-Username: openidm-admin" -H "X-OpenIDM-Password: openidm-admin" --data '{"userName":"simonn467","mail":"si@si.com","givenName":"simon","sn":"harding","isCool":true}' 'http://localhost:8080/openidm/managed/user?_action=create&_prettyPrint=true'
      

      3. Add an input field to AdminUserProfileTemplate.html

              <div class="clearfix">
      
                  <div class="group-field-block col2">
                      <label for="isCool" class="light align-right">is Cool</label>
                      <div class="float-left separate-message">
                          <div class="group-input-span">
                              <input type="text" id="isCool" name="isCool">
                              <span class="error"></span>
                          </div>
                          <div class="validation-message"></div>
                      </div>
                  </div>
      
              </div>
      

      Result: Despite the boolean value being received VIA rest, the input element is not populated with the value as expected.

      I am not sure if this is an issue with the ForgeRock UI code or with JS2form.

      Work around: Add something like the following line to AdminUserProfileView.js, around line 162 in reloadData:

      this.$el.find("input[name=isCool]").val(this.editedUser.isCool);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jake.feasel Jake Feasel
                Reporter:
                simon.harding Simon Harding
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: