This commit is contained in:
2026-08-17 23:06:07 +02:00
parent a7e53ca0a3
commit 2a2b01bf59
10 changed files with 9 additions and 52 deletions
+2 -4
View File
@@ -308,11 +308,9 @@ func (s *Server) handleMe(w http.ResponseWriter, r *http.Request) {
if accessErr == nil && access.FullAdmin && access.Role == auth.StaffRoleAdmin {
staffTenantSwitch = true
all, listErr := s.Auth.ListCompanies(r.Context(), 500)
if listErr != nil {
Error(w, http.StatusInternalServerError, "failed to load companies")
return
if listErr == nil {
companies = all
}
companies = all
}
cidStr := s.Sessions.GetString(r.Context(), auth.SessionCompanyIDKey)
homeStr := strings.TrimSpace(s.Sessions.GetString(r.Context(), auth.SessionStaffHomeCompanyKey))