[server] Remove ldap command

This commit is contained in:
Abhishek Shroff
2025-07-08 00:09:48 +05:30
parent e2746d8541
commit 8069afb06b

View File

@@ -4,7 +4,6 @@ import (
"context"
"embed"
"errors"
"fmt"
"os"
"path"
"strings"
@@ -145,7 +144,6 @@ func SetupCommand() {
fs.SetupCommand(),
user.SetupCommand(),
serve.SetupCommand(),
createLDAPTestCommand(),
)
cmd.AddGroup(&cobra.Group{ID: "misc", Title: "Misc"})
cmd.SetHelpCommandGroupID("misc")
@@ -153,21 +151,6 @@ func SetupCommand() {
cmd.Execute()
}
func createLDAPTestCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "ldap",
}
cmd.Run = func(c *cobra.Command, args []string) {
if u, err := auth.VerifyUserPassword(db.Get(context.Background()), "ldaptest@kudosoft.net", "asdfasdf"); err != nil {
fmt.Println(err.Error())
} else {
fmt.Printf("%+v\n", u)
}
}
return cmd
}
func isCmd(cmd *cobra.Command, s string) bool {
for c := cmd; c != nil; c = c.Parent() {
if cmd.Name() == s {