From 2bc3351b8067ca694172f229437d9f8637b660c2 Mon Sep 17 00:00:00 2001 From: christian-stauffer Date: Fri, 16 Feb 2024 13:35:30 +0100 Subject: [PATCH] linter --- eliona/single_sign_on.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eliona/single_sign_on.go b/eliona/single_sign_on.go index 8185061..81b5385 100644 --- a/eliona/single_sign_on.go +++ b/eliona/single_sign_on.go @@ -166,7 +166,6 @@ func (s *SingleSignOn) Authentication(w http.ResponseWriter, r *http.Request) { if err != nil { log.Error(LOG_REGIO, "mapping failed: sysRoleId:%v, projRoleId:%v, lang:%v", sysRoleId, projRoleId, lang) - errorMessage = []byte(err.Error()) goto notAuthenticated } @@ -315,9 +314,9 @@ func (s *SingleSignOn) getPermissionsAndLang(samlCtx context.Context) (sysRoleId samlValue := samlsp.AttributeFromContext(samlCtx, *permissions.LanguageSamlAttribute) elionaLang := langMap[samlValue] - switch elionaLang.(type) { + switch l := elionaLang.(type) { case string: - lang = elionaLang.(string) + lang = l default: log.Warn(LOG_REGIO, "language after map invalid type: %T, %v", lang, lang) }