Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/main_endpoints/routes/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@

let fieldsToIterateOver = ALLOWED_FIELDS;
if (isAtLeastAnOfficer) {
fieldsToIterateOver = Object.keys(existingUser);
fieldsToIterateOver = Object.keys(existingUser).concat(SENSITIVE_FIELDS);
}

fieldsToIterateOver.forEach(field => {
// Only include the field if it was provided in the request body
if (userData[field] !== undefined) {
if (userData[field] !== undefined) {

Check failure on line 311 in api/main_endpoints/routes/User.js

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

Expected indentation of 4 spaces but found 5
// Check if value actually changed for audit
if (userData[field] !== existingUser[field]) {
fieldChanges[field] = { from: existingUser[field], to: userData[field] };
Expand Down
Loading