Skip to content

Commit

Permalink
chore(web): remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcorado committed Dec 14, 2024
1 parent c05b558 commit a53effd
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/web/servers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/gravitational/teleport/api/types"
"github.com/gravitational/teleport/lib/httplib"
"github.com/gravitational/teleport/lib/reversetunnelclient"
"github.com/gravitational/teleport/lib/services"
"github.com/gravitational/teleport/lib/ui"
webui "github.com/gravitational/teleport/lib/web/ui"
)
Expand Down Expand Up @@ -323,25 +322,6 @@ func (h *Handler) desktopIsActive(w http.ResponseWriter, r *http.Request, p http
return desktopIsActive{false}, nil
}

func getDatabaseUsersAndNames(accessChecker services.AccessChecker) (dbNames []string, dbUsers []string, err error) {
dbNames, dbUsers, err = accessChecker.CheckDatabaseNamesAndUsers(0, true /* force ttl override*/)
if err != nil {
// if NotFound error:
// This user cannot request database access, has no assigned database names or users
//
// Every other error should be reported upstream.
if !trace.IsNotFound(err) {
return nil, nil, trace.Wrap(err)
}

// We proceed with an empty list of DBUsers and DBNames
dbUsers = []string{}
dbNames = []string{}
}

return dbNames, dbUsers, nil
}

type desktopIsActive struct {
Active bool `json:"active"`
}
Expand Down

0 comments on commit a53effd

Please sign in to comment.