storj/satellite
Cameron eefef2eb17 satellite/console: pass entire auth.User into users.Update in service.UpdateAccount
The Update method of the usersDB takes a console.User as an argument.
To update the columns in the DB, we have to migrate the fields from the
console.Users struct into a special dbx struct. If one of these fields
is left empty, then the zero value of that field's type will be used to
update the respective column.

In most cases where the users.Update method is called, the entire
console.User is apparently retrieved first, fields are updated, then it
is passed to users.Update. This is not the case for
service.UpdateAccount. Because these fields are not populated in the
user struct in UpdateAccount before it is passed into users.Update,
their respective columns in the database are overwritten with zero:

ProjectLimit, ProjectStorageLimit, ProjectBandwidthLimit,
ProjectSegmentLimit, PaidTier, MfaEnabled, MfaRecoveryCodes, MfaSecretKey

Solution: Do what is done in other places which call users.Update. Take
the console.User from the auth context, update the relevant fields on
that, then pass that in.

Change-Id: I3cbd560e8ea5397e5c27711fb40bb3907d987028
2022-02-11 15:33:04 +00:00
..
accounting satellitedb/projectaccounting, web/satellite: reworked bandwidth chart to show both allocated and settled bandwidth 2022-02-08 22:07:59 +00:00
admin satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
analytics satellite/analytics: track origin header and referer on signup 2022-01-03 17:47:48 +00:00
attribution satellite/{satellitedb,attribution,console}: value attribution changes that add userAgent field to buckets table and all tables that have partner_id 2021-10-18 13:56:19 +00:00
audit satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
buckets satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
compensation satellite/compensation: add wallet features to invoice csv 2021-02-08 22:13:48 +02:00
console satellite/console: pass entire auth.User into users.Update in service.UpdateAccount 2022-02-11 15:33:04 +00:00
contact satellite/contact: fix connection leak in PingMe endpoint 2022-01-20 14:20:24 +00:00
gc mod: use vendored base58 2022-01-31 15:54:33 +02:00
geoip satellite/geoip: update node check-in to associate a country code 2021-11-10 16:44:41 +01:00
gracefulexit satellite/gracefulexit: stop using gracefulexit_transfer_queue 2021-09-14 11:52:34 +00:00
inspector satellite/metabase: drop GetObjectLatestVersion method 2022-02-02 09:40:53 +00:00
internalpb satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
mailservice satellite/{console,satellitedb}: Forbid creating users with used email 2021-12-15 17:24:35 +00:00
metabase satellite/metabase: adjust segment_copies table primary key. 2022-02-10 13:52:16 +00:00
metainfo satellite/metainfo: only collect metric "other" once per user agent 2022-02-09 18:18:55 +00:00
metrics satellite/metrics: speedup test 2021-09-28 11:39:37 +02:00
nodeapiversion satellite/nodeapiversion: new table for tracking node api usage 2020-07-09 15:02:25 +00:00
nodeselection/uploadselection satellite/nodeselection: add geofencing constraints to the node selection criteria 2021-11-08 17:04:31 +00:00
nodestats satellite/nodestats: use overlay node for reputation status 2022-01-11 16:38:27 +00:00
oidc satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
orders satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
overlay satellite/overlay: add test for UpdateCheckIn panic 2022-01-24 15:01:59 +02:00
payments satellite/satellitedb: phase 2 getting rid of gob encodings in db 2022-02-09 12:25:46 +00:00
repair satellite/metabase: drop DeleteObjectLatestVersion method 2022-02-02 14:33:48 +00:00
reputation satellite/{audit, reputation}: fix potential nodes reputation status 2022-01-06 21:05:59 +00:00
revocation satellite/satellitedb: move tests to their domains 2021-02-19 17:29:15 +02:00
rewards satellite/rewards: adding SeaweedFS to partners list (#4230) 2021-10-19 21:30:31 +02:00
satellitedb satellite/satellitedb: phase 2 getting rid of gob encodings in db 2022-02-09 12:25:46 +00:00
snopayouts all: fix error naming 2021-04-29 15:38:21 +03:00
admin.go satellite/buckets: add new buckets service 2021-11-16 12:36:17 +02:00
api.go satellite/metainfo: add segment limit validation, caching 2022-01-10 14:33:26 +02:00
configlock_test.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
core.go satellite/buckets: add new buckets service 2021-11-16 12:36:17 +02:00
gc.go satellite/metabase/segmentloop: don't shutdown satellite on loop error 2021-07-30 06:49:10 +00:00
peer.go satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
repairer.go satellite/buckets: add new buckets service 2021-11-16 12:36:17 +02:00