- mappa iniziale
- fix PATCH /chval Json Injections: era possibile cambiare la password ! - ogni giorno sblocca la lista di chi chiede troppe richieste di recupero password.
This commit is contained in:
@@ -3765,14 +3765,23 @@ module.exports = {
|
||||
return mystr.replace(/\s+/g, '');
|
||||
},
|
||||
|
||||
ModificheConsentite(table, fieldsvalue, idrec, user) {
|
||||
ModificheConsentite(req, table, fieldsvalue, idrec, user) {
|
||||
if (table === 'sharewithus') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (table === 'hours') {
|
||||
return true;
|
||||
}
|
||||
if (table === 'users') {
|
||||
if (idrec && (req.user._id.toString() === idrec)) {
|
||||
if (Object.keys(fieldsvalue).some(key => key.startsWith('profile.'))) {
|
||||
return true;
|
||||
}
|
||||
if (Object.keys(fieldsvalue).some(key => server_constants.User_Fields.includes(key))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if ('aportador_solidario' in fieldsvalue) {
|
||||
return true;
|
||||
}
|
||||
@@ -4891,7 +4900,7 @@ module.exports = {
|
||||
// console.log(`${city.descr}: Lat ${city.lat}, Long ${city.long}`);
|
||||
return city;
|
||||
} else {
|
||||
console.error(`Coordinate non trovate per ${city.descr}, ${city.prov}`);
|
||||
console.error(`Coordinate non trovate per ${city.descr}, ${city.prov}`);
|
||||
}
|
||||
return null;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user