@@ -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 */
40114009KuzzleSecurity . 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 */
40504049KuzzleSecurity . 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 */
42244224KuzzleSecurity . 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 */
42614262KuzzleSecurity . 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 */
44854487KuzzleSecurity . prototype . getUserRights = function ( userId , options , cb ) {
44864488 var
0 commit comments