mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 11:39:42 -06:00
[server] Remove ldap command
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user