From 5a29a031adbcaca85ad641bf74254d3ea985d03c Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 23 Jul 2023 12:33:17 +0200 Subject: [chore] Admin CLI + new account creation refactoring (#2008) * set maxPasswordLength to 72 bytes, rename validate function * refactor NewSignup * refactor admin account CLI commands * refactor oidc create user * refactor processor create * tweak password change, check old != new password --- internal/db/admin.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'internal/db/admin.go') diff --git a/internal/db/admin.go b/internal/db/admin.go index 29ddaa616..57ded68b1 100644 --- a/internal/db/admin.go +++ b/internal/db/admin.go @@ -19,7 +19,6 @@ package db import ( "context" - "net" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" ) @@ -39,7 +38,7 @@ type Admin interface { // NewSignup creates a new user in the database with the given parameters. // By the time this function is called, it should be assumed that all the parameters have passed validation! - NewSignup(ctx context.Context, username string, reason string, requireApproval bool, email string, password string, signUpIP net.IP, locale string, appID string, emailVerified bool, externalID string, admin bool) (*gtsmodel.User, Error) + NewSignup(ctx context.Context, newSignup gtsmodel.NewSignup) (*gtsmodel.User, Error) // CreateInstanceAccount creates an account in the database with the same username as the instance host value. // Ie., if the instance is hosted at 'example.org' the instance user will have a username of 'example.org'. -- cgit v1.2.3