diff --git a/templates/loader.go b/templates/loader.go index 432dee4d..b9b41499 100644 --- a/templates/loader.go +++ b/templates/loader.go @@ -591,7 +591,7 @@ func readDirFilter(fsys fs.FS, name string, fn func(fs.DirEntry) bool) ([]fs.Dir func readDirFilterString(fsys fs.FS, name string, fn func(fs.DirEntry) bool) ([]string, error) { const op errors.Op = "templates/readDirFilterString" - entries, err := readDirFilter(fsys, ".", fn) + entries, err := readDirFilter(fsys, name, fn) if err != nil { return nil, errors.E(op, err) } diff --git a/website/admin/profiles.go b/website/admin/profiles.go index 06836c7e..02d61047 100644 --- a/website/admin/profiles.go +++ b/website/admin/profiles.go @@ -593,7 +593,7 @@ func (pf *ProfileForm) ToValues() url.Values { values.Set("username", pf.Username) values.Set("ip", pf.IP) values.Set("email", pf.Email) - for perm, _ := range pf.UserPermissions { + for perm := range pf.UserPermissions { values.Add("permissions", string(perm)) }