Whitelist filter. Fix #20
This commit is contained in:
parent
5e502244cc
commit
8cfdd45de7
6
.gitignore
vendored
6
.gitignore
vendored
@ -216,3 +216,9 @@ pip-log.txt
|
||||
|
||||
sftp-config.json
|
||||
node_modules/
|
||||
|
||||
####################
|
||||
# JetBrains
|
||||
####################
|
||||
|
||||
.idea
|
||||
|
@ -264,5 +264,11 @@
|
||||
});
|
||||
};
|
||||
|
||||
// If this filter is not there, the deleteUserData function will fail when getting the metryId for deletion.
|
||||
OAuth.whitelistFields = function(params, callback) {
|
||||
params.whitelist.push(constants.name + 'Id');
|
||||
callback(null, params);
|
||||
};
|
||||
|
||||
module.exports = OAuth;
|
||||
}(module));
|
||||
|
@ -6,6 +6,7 @@
|
||||
"library": "./library.js",
|
||||
"hooks": [
|
||||
{ "hook": "static:user.delete", "method": "deleteUserData" },
|
||||
{ "hook": "filter:user.whitelistFields", "method": "whitelistFields" },
|
||||
{ "hook": "filter:auth.init", "method": "getStrategy" }
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user