storj/satellite/console
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
..
consoleauth all: fix linter complaints 2020-10-13 15:59:01 +03:00
consolewasm satellite/console: add more tests for uplink access permission 2021-06-23 11:58:29 +00:00
consoleweb satellite/console{gen}: GetUsersProjects endpoint 2022-02-10 08:03:02 +00:00
wasm satellite/wasm: support restricting full access grants to paths 2021-03-26 19:49:21 +00:00
apikeys_test.go satellite/satellitedb: select user_agent in apikeys method GetPagedByProjectID 2022-01-03 11:58:26 -05:00
apikeys.go 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
attribution_test.go satellite/buckets: add new buckets service 2021-11-16 12:36:17 +02:00
auth.go all: fix error naming 2021-04-29 15:38:21 +03:00
billinghistoryitem.go satellite/payments: available coupon value feature 2020-06-02 10:00:45 +00:00
buckets.go satellite/metabase: move package one level higher 2021-04-21 15:54:22 +03:00
database.go satellite/oidc: move oidc into common package 2022-02-08 09:46:54 -06:00
mfa.go satellite/{console,satellitedb}: Forbid creating users with used email 2021-12-15 17:24:35 +00:00
projectmembers_test.go all: remove old uuid 2020-04-02 19:30:36 +03:00
projectmembers.go all: add missing dots 2020-08-11 17:50:01 +03:00
projects_test.go satellite/{admin,console}: Move tests 2021-10-01 12:25:37 +00:00
projects.go satellite/console: fix default limit for free-tier segment usage limit 2022-01-19 09:21:13 +00:00
projectusagelimits.go satellite/{console,satellitedb}: add project segment limit to user 2021-12-16 08:46:01 +00:00
recaptcha_test.go satellite/console: Forward friendly registration errors to client 2021-07-22 11:31:12 +00:00
recaptcha.go satellite/console: Add reCAPTCHA verification step to registration 2021-07-07 21:34:07 +00:00
registrationtoken.go all: golangci-lint v1.33.0 fixes (#3985) 2020-12-05 17:01:42 +01:00
request.go audit logging: log important user activity 2020-09-07 15:26:34 +00:00
resetpasswordtoken_test.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
resetpasswordtoken.go all: golangci-lint v1.33.0 fixes (#3985) 2020-12-05 17:01:42 +01:00
service_test.go satellite/console: verify limits while test 2022-01-19 16:39:36 +00:00
service.go satellite/console: pass entire auth.User into users.Update in service.UpdateAccount 2022-02-11 15:33:04 +00:00
sortdirection.go all: fix comments 2020-07-16 19:13:14 +03:00
users_test.go web/console: Save timestamp when creating users to mark their first email verification notification. 2022-01-24 16:53:51 +00:00
users.go satellite/{admin,payments,satellitedb}: add checks for deletion of free tier accounts 2022-02-08 10:11:31 +00:00
validation.go all: fix error naming 2021-04-29 15:38:21 +03:00