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

embedded DJ explicit mapping returns null instead of []

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: Module - Repository DS
    • Labels:
    • Environment:
      OpenIDM: 7.0.0-SNAPSHOT 55394c2

      Description

      When creating user with on embedded dj explicit mapping, the effectiveAssignments is returned as null instead of an empty array like all other repositories do.

       	curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "rsutter", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user", "roles": [{"_ref": "managed/role/role1"}, {"_ref": "managed/role/role2"}]}' --request PUT "http://localhost:8080/openidm/managed/user/ricksutter"
      
      Response Content:
      {
      	"effectiveAssignments": null,  <=== THIS
      ...
      	"_id": "ricksutter",
      	"_rev": "00000000f67000a4",
      	"userName": "rsutter",
      	"accountStatus": "active",
      	"effectiveRoles": [{
      		"_ref": "managed/role/role1"
      	}, {
      		"_ref": "managed/role/role2"
      	}],
      	"postalCode": null,
      	"description": "Just another user",
      	"givenName": "rick",
      	"sn": "sutter",
      	"telephoneNumber": "6669876987",
      	"mail": "rick@example.com",
      	"id": "ricksutter",
      	"history": null
      }
      

      vs generic embedded dj:

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "rsutter", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user", "roles": [{"_ref": "managed/role/role1"}, {"_ref": "managed/role/role2"}]}' --request PUT "http://localhost:8080/openidm/managed/user/ricksutter"
      
      Response Content:
      {
      	"effectiveAssignments": []  <=== THIS
      	"_id": "ricksutter",
      	"_rev": "00000000db180904",
      	"id": "ricksutter",
      	"userName": "rsutter",
      	"givenName": "rick",
      	"sn": "sutter",
      	"mail": "rick@example.com",
      	"telephoneNumber": "6669876987",
      	"description": "Just another user",
      	"accountStatus": "active",
      	"effectiveRoles": [{
      		"_ref": "managed/role/role1"
      	}, {
      		"_ref": "managed/role/role2"
      	}],
      }
      

      or mysql explicit:

       	curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin" --header "If-None-Match: *" --header "Content-Type: application/json" --data '{"id": "ricksutter", "userName": "rsutter", "givenName": "rick", "sn": "sutter", "mail": "rick@example.com", "telephoneNumber": "6669876987", "password": "Th3Password", "description": "Just another user", "roles": [{"_ref": "managed/role/role1"}, {"_ref": "managed/role/role2"}]}' --request PUT "http://localhost:8080/openidm/managed/user/ricksutter"
      
      Response Content:
      {
      	"effectiveAssignments": [], <=== THIS
      	"_id": "ricksutter",
      	"_rev": "0",
      	"userName": "rsutter",
      	"accountStatus": "active",
      	"givenName": "rick",
      	"description": "Just another user",
      	"sn": "sutter",
      	"telephoneNumber": "6669876987",
      	"mail": "rick@example.com",
      	"kbaInfo": null,
      	"preferences": null,
      	"consentedMappings": null,
      	"effectiveRoles": [{
      		"_ref": "managed/role/role1"
      	}, {
      		"_ref": "managed/role/role2"
      	}],
      	"active": null,
      	"id": "ricksutter",
      	"history": null
      ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dhogan Dirk Hogan
                Reporter:
                Ladislav.Folta Ladislav Folta
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: