Closed stafyniaksacha closed 8 years ago
well spotted I take it
Not a bug in my sense.
"non hydrated" profiles means in fact "non nested", that is without nested roles details. But the "allowInternalIndex" attribute, as well as the "restrictedTo" one, are set at profile level (see Permission documentation for more explanations). So the actual formating is ok.
Note we are planing to refactor the repositories, and then simplify the get/search Users/Profiles/Roles actions. The "hydrate= false" option will no longer be used and these actions will allways return a non-nested result. That means: for seachProfiles, the response format will allways be like actual one with "hydrate=false":
{
"_id": "admin",
"_source": {
"roles": [
{
"_id": "admin",
"allowInternalIndex": true
}
]
}
}
resolved with #312
Given we make this request
POST
http://localhost:7511/api/1.0/profiles/_search
Kuzzle format profiles like :
BUT in case we ask for non hydrated profiles
POST
http://localhost:7511/api/1.0/profiles/_search
Kuzzle respond a wired object
Instead of