Skip to content

Commit 638ff41

Browse files
author
Jeff
committed
nitpick following @ballinette's advice
1 parent f17874b commit 638ff41

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

dist/kuzzle.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3604,7 +3604,7 @@ KuzzleProfile.prototype.save = function (options, cb) {
36043604

36053605
/**
36063606
* Add a policy in the policies list
3607-
* @param {Object} role - must be an object containing at least a "roleId" member which must be a string.
3607+
* @param {Object} policy - must be an object containing at least a "roleId" member which must be a string.
36083608
*
36093609
* @returns {KuzzleProfile} this
36103610
*/
@@ -3660,9 +3660,6 @@ KuzzleProfile.prototype.serialize = function () {
36603660
}
36613661

36623662
data.body = this.content;
3663-
if (!data.body.policies || !Array.isArray(data.body.policies)) {
3664-
return data;
3665-
}
36663663

36673664
return data;
36683665
};
@@ -4006,6 +4003,7 @@ KuzzleSecurity.prototype.roleFactory = function(id, content) {
40064003
*
40074004
*
40084005
* @param {string} id
4006+
* @param {object} [options] - (optional) arguments
40094007
* @param {responseCallback} cb - returns Kuzzle's response
40104008
*/
40114009
KuzzleSecurity.prototype.getProfile = function (id, options, cb) {
@@ -4045,6 +4043,7 @@ KuzzleSecurity.prototype.getProfile = function (id, options, cb) {
40454043
* That means that a profile that was just been created won’t be returned by this function.
40464044
*
40474045
* @param {Object} filters - this object can contains an array `roles` with a list of roles id, a integer `from` and a integer `size`
4046+
* @param {object} [options] - (optional) arguments
40484047
* @param {responseCallback} [cb] - returns Kuzzle's response
40494048
*/
40504049
KuzzleSecurity.prototype.searchProfiles = function (filters, options, cb) {
@@ -4219,6 +4218,7 @@ KuzzleSecurity.prototype.profileFactory = function(id, content) {
42194218
* Get a specific user from kuzzle using its unique ID
42204219
*
42214220
* @param {string} id
4221+
* @param {object} [options] - (optional) arguments
42224222
* @param {responseCallback} cb - returns Kuzzle's response
42234223
*/
42244224
KuzzleSecurity.prototype.getUser = function (id, options, cb) {
@@ -4256,6 +4256,7 @@ KuzzleSecurity.prototype.getUser = function (id, options, cb) {
42564256
* That means that a user that was just been created won’t be returned by this function.
42574257
*
42584258
* @param {Object} filters - same filters as documents filters
4259+
* @param {object} [options] - (optional) arguments
42594260
* @param {responseCallback} [cb] - returns Kuzzle's response
42604261
*/
42614262
KuzzleSecurity.prototype.searchUsers = function (filters, options, cb) {
@@ -4479,8 +4480,9 @@ KuzzleSecurity.prototype.isActionAllowed = function(rights, controller, action,
44794480
/**
44804481
* Gets the rights array of a given user.
44814482
*
4482-
* @param {string} userId The id of the user.
4483-
* @param {function} cb The callback containing the normalized array of rights.
4483+
* @param {string} userId The id of the user.
4484+
* @param {object} [options] - (optional) arguments
4485+
* @param {function} cb The callback containing the normalized array of rights.
44844486
*/
44854487
KuzzleSecurity.prototype.getUserRights = function (userId, options, cb) {
44864488
var

dist/kuzzle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/kuzzle.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/security/kuzzleProfile.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ KuzzleProfile.prototype.save = function (options, cb) {
7575

7676
/**
7777
* Add a policy in the policies list
78-
* @param {Object} role - must be an object containing at least a "roleId" member which must be a string.
78+
* @param {Object} policy - must be an object containing at least a "roleId" member which must be a string.
7979
*
8080
* @returns {KuzzleProfile} this
8181
*/
@@ -131,9 +131,6 @@ KuzzleProfile.prototype.serialize = function () {
131131
}
132132

133133
data.body = this.content;
134-
if (!data.body.policies || !Array.isArray(data.body.policies)) {
135-
return data;
136-
}
137134

138135
return data;
139136
};

0 commit comments

Comments
 (0)