mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
add verbose message for field whitelist
This commit is contained in:
@@ -78,7 +78,11 @@ module.exports = function (User) {
|
|||||||
function (results, next) {
|
function (results, next) {
|
||||||
if (fields.length) {
|
if (fields.length) {
|
||||||
fields = fields.filter(function (field) {
|
fields = fields.filter(function (field) {
|
||||||
return field && results.whitelist.includes(field);
|
var isFieldWhitelisted = field && results.whitelist.includes(field);
|
||||||
|
if (!isFieldWhitelisted) {
|
||||||
|
winston.verbose('[user/getUsersFields] ' + field + ' removed because it is not whitelisted, see `filter:user.whietlistFields`');
|
||||||
|
}
|
||||||
|
return isFieldWhitelisted;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
fields = results.whitelist;
|
fields = results.whitelist;
|
||||||
|
|||||||
Reference in New Issue
Block a user