diff --git a/common/utils/idm.go b/common/utils/idm.go index 0e32ca1b44..70c515833b 100644 --- a/common/utils/idm.go +++ b/common/utils/idm.go @@ -310,7 +310,7 @@ func FindUserNameInContext(ctx context.Context) (string, claim.Claims) { var userName string var claims claim.Claims if ctx.Value(claim.ContextKey) != nil { - claims := ctx.Value(claim.ContextKey).(claim.Claims) + claims = ctx.Value(claim.ContextKey).(claim.Claims) userName = claims.Name } else if ctx.Value(common.PYDIO_CONTEXT_USER_KEY) != nil { userName = ctx.Value(common.PYDIO_CONTEXT_USER_KEY).(string)