allow user to limit time scope for editing transaction

This commit is contained in:
MaysWind
2021-03-11 01:16:30 +08:00
parent d3d1bc59b2
commit bd26796184
13 changed files with 292 additions and 73 deletions
+4
View File
@@ -198,6 +198,10 @@ func (s *UserService) UpdateUser(user *models.User) (keyProfileUpdated bool, err
updateCols = append(updateCols, "first_day_of_week")
}
if models.TRANSACTION_EDIT_SCOPE_NONE <= user.TransactionEditScope && user.TransactionEditScope <= models.TRANSACTION_EDIT_SCOPE_THIS_YEAR_OR_LATER {
updateCols = append(updateCols, "transaction_edit_scope")
}
user.UpdatedUnixTime = now
updateCols = append(updateCols, "updated_unix_time")