diff --git a/server/main.go b/server/main.go index 0e034d3..b09b4c6 100644 --- a/server/main.go +++ b/server/main.go @@ -10,10 +10,11 @@ func main() { as := args.NewArgSet() as.Append(args.INT, "p", "port to listen on", 3004) as.Append(args.STRING, "d", "root dir with /index.html and /media and /files", "./public") + as.Append(args.BOOL, "ldap", "ldap features", false) if err := as.Parse(); err != nil { panic(err) } - s := NewServer(as.GetString("d")) + s := NewServer(as.GetString("d"), as.GetBool("ldap")) if err := s.Routes(); err != nil { panic(err) } diff --git a/server/public/ui/templates/_namespace.ctmpl b/server/public/ui/templates/_namespace.ctmpl index 7dc3bf3..3b17f96 100644 --- a/server/public/ui/templates/_namespace.ctmpl +++ b/server/public/ui/templates/_namespace.ctmpl @@ -2,7 +2,8 @@ {{ if .This.Namespaces }} diff --git a/server/server.go b/server/server.go index 08316bc..32617d4 100644 --- a/server/server.go +++ b/server/server.go @@ -28,12 +28,14 @@ import ( type Server struct { router *router.Router root string + ldap bool } -func NewServer(root string) *Server { +func NewServer(root string, ldap bool) *Server { return &Server{ router: router.New(), root: root, + ldap: ldap, } }