Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-stauffer authored and zdevaty committed Feb 27, 2024
1 parent 1f8795e commit ff4097d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions eliona/single_sign_on.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit ff4097d

Please sign in to comment.