1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

fix(code): remove unused code EE-4431 (#7866)

This commit is contained in:
andres-portainer 2022-10-14 19:42:31 -03:00 committed by GitHub
parent ae2bec4bd9
commit 191f8e17ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 8 additions and 397 deletions

View file

@ -6,7 +6,6 @@ import (
"github.com/gorilla/mux"
httperror "github.com/portainer/libhttp/error"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/adminmonitor"
"github.com/portainer/portainer/api/dataservices"
"github.com/portainer/portainer/api/demo"
@ -71,11 +70,3 @@ func adminAccess(next http.Handler) http.Handler {
next.ServeHTTP(w, r)
})
}
func systemWasInitialized(dataStore dataservices.DataStore) (bool, error) {
users, err := dataStore.User().UsersByRole(portainer.AdministratorRole)
if err != nil {
return false, err
}
return len(users) > 0, nil
}