Skip to content

Commit 9db8ee9

Browse files
author
ballinette
committed
Merge branch 'develop' into improve-getProfile-test
2 parents 4bbc0e1 + 383de9f commit 9db8ee9

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
*__note:__ the # at the end of lines are the pull request numbers on GitHub*
2+
3+
# 1.9.1
4+
5+
* Fix issue #91
6+
17
# 1.9.0
28

39
## Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kuzzle-sdk",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "Official Javascript SDK for Kuzzle",
55
"author": "The Kuzzle Team <[email protected]>",
66
"repository": {

src/security/kuzzleSecurity.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,15 @@ KuzzleSecurity.prototype.getProfile = function (id, options, cb) {
289289

290290
if (!hydrate) {
291291
response.result._source.roles = response.result._source.roles.map(function (role) {
292-
return role._id;
292+
var formattedRole = {_id: role._id};
293+
if (role._source.restrictedTo !== undefined) {
294+
formattedRole.restrictedTo = role._source.restrictedTo;
295+
}
296+
if (role._source.allowInternalIndex !== undefined) {
297+
formattedRole.allowInternalIndex = role._source.allowInternalIndex;
298+
}
299+
300+
return formattedRole;
293301
});
294302
}
295303

0 commit comments

Comments
 (0)