0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-18 13:02:54 +02:00

fix formatting

This commit is contained in:
TheFox0x7 2025-05-21 00:30:52 +02:00
parent 553b43ac8d
commit 69cde4d79a
No known key found for this signature in database
GPG Key ID: 6CA33903484AF7C2
5 changed files with 6 additions and 5 deletions

View File

@ -140,7 +140,8 @@ func newMicrocmdAuthAddLdapSimpleAuth() *cli.Command {
&cli.StringFlag{Name: "public-ssh-key-attribute", Usage: "The attribute of the users LDAP record containing the users public ssh key."}, &cli.StringFlag{Name: "public-ssh-key-attribute", Usage: "The attribute of the users LDAP record containing the users public ssh key."},
&cli.BoolFlag{Name: "skip-local-2fa", Usage: "Set to true to skip local 2fa for users authenticated by this source"}, &cli.BoolFlag{Name: "skip-local-2fa", Usage: "Set to true to skip local 2fa for users authenticated by this source"},
&cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the users LDAP record containing the users avatar."}, &cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the users LDAP record containing the users avatar."},
&cli.StringFlag{Name: "user-dn", Usage: "The user's DN.", Required: true}}, &cli.StringFlag{Name: "user-dn", Usage: "The user's DN.", Required: true},
},
} }
} }
@ -173,7 +174,8 @@ func newMicrocmdAuthUpdateLdapSimpleAuth() *cli.Command {
&cli.BoolFlag{Name: "skip-local-2fa", Usage: "Set to true to skip local 2fa for users authenticated by this source"}, &cli.BoolFlag{Name: "skip-local-2fa", Usage: "Set to true to skip local 2fa for users authenticated by this source"},
&cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the users LDAP record containing the users avatar."}, &cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the users LDAP record containing the users avatar."},
&cli.StringFlag{Name: "user-dn", Usage: "The user's DN."}, &cli.StringFlag{Name: "user-dn", Usage: "The user's DN."},
}} },
}
} }
// newAuthService creates a service with default functions. // newAuthService creates a service with default functions.

View File

@ -86,6 +86,7 @@ func microcmdAuthUpdateSMTP() *cli.Command {
}}, smtpCLIFlags()[1:]...)...), }}, smtpCLIFlags()[1:]...)...),
} }
} }
func microcmdAuthAddSMTP() *cli.Command { func microcmdAuthAddSMTP() *cli.Command {
return &cli.Command{ return &cli.Command{
Name: "add-smtp", Name: "add-smtp",

View File

@ -258,7 +258,6 @@ func TestUpdateSMTP(t *testing.T) {
}, },
TwoFactorPolicy: "skip", TwoFactorPolicy: "skip",
}, nil }, nil
}, },
updateAuthSource: func(ctx context.Context, source *auth_model.Source) error { updateAuthSource: func(ctx context.Context, source *auth_model.Source) error {

View File

@ -27,7 +27,7 @@ func microcmdUserCreate() *cli.Command {
MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{ MutuallyExclusiveFlags: []cli.MutuallyExclusiveFlags{
{ {
Flags: [][]cli.Flag{ Flags: [][]cli.Flag{
[]cli.Flag{ {
&cli.StringFlag{ &cli.StringFlag{
Name: "name", Name: "name",
Usage: "Username. DEPRECATED: use username instead", Usage: "Username. DEPRECATED: use username instead",

View File

@ -18,7 +18,6 @@ import (
) )
func TestAdminUserCreate(t *testing.T) { func TestAdminUserCreate(t *testing.T) {
reset := func() { reset := func() {
require.NoError(t, db.TruncateBeans(db.DefaultContext, &user_model.User{})) require.NoError(t, db.TruncateBeans(db.DefaultContext, &user_model.User{}))
require.NoError(t, db.TruncateBeans(db.DefaultContext, &user_model.EmailAddress{})) require.NoError(t, db.TruncateBeans(db.DefaultContext, &user_model.EmailAddress{}))