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:
parent
553b43ac8d
commit
69cde4d79a
@ -140,7 +140,8 @@ func newMicrocmdAuthAddLdapSimpleAuth() *cli.Command {
|
|||||||
&cli.StringFlag{Name: "public-ssh-key-attribute", Usage: "The attribute of the user’s LDAP record containing the user’s public ssh key."},
|
&cli.StringFlag{Name: "public-ssh-key-attribute", Usage: "The attribute of the user’s LDAP record containing the user’s 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 user’s LDAP record containing the user’s avatar."},
|
&cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the user’s LDAP record containing the user’s 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 user’s LDAP record containing the user’s avatar."},
|
&cli.StringFlag{Name: "avatar-attribute", Usage: "The attribute of the user’s LDAP record containing the user’s 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.
|
||||||
|
@ -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",
|
||||||
|
@ -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 {
|
||||||
|
@ -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",
|
||||||
|
@ -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{}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user