mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
feat: sort configured providers based on name length
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"tinyauth/internal/config"
|
"tinyauth/internal/config"
|
||||||
@@ -157,6 +158,10 @@ func (app *BootstrapApp) Setup() error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Slice(configuredProviders, func(i, j int) bool {
|
||||||
|
return configuredProviders[i].Name < configuredProviders[j].Name
|
||||||
|
})
|
||||||
|
|
||||||
if authService.UserAuthConfigured() || ldapService != nil {
|
if authService.UserAuthConfigured() || ldapService != nil {
|
||||||
configuredProviders = append(configuredProviders, controller.Provider{
|
configuredProviders = append(configuredProviders, controller.Provider{
|
||||||
Name: "Username",
|
Name: "Username",
|
||||||
|
|||||||
Reference in New Issue
Block a user