Chore: Fix error handling in postDashboard, remove UserDisplayDTO, fix live redis client initialization (#87206)
* clean up error handling in postDashboard and remove UserDisplayDTO * replace GetUserUID with GetUID and GetNamespacedUID, enforce namespace constant type * lint fix * lint fix * more lint fixes
This commit is contained in:
@@ -115,8 +115,7 @@ func ApplyUserHeader(sendUserHeader bool, req *http.Request, user identity.Reque
|
||||
}
|
||||
|
||||
namespace, _ := user.GetNamespacedID()
|
||||
switch namespace {
|
||||
case identity.NamespaceUser, identity.NamespaceServiceAccount:
|
||||
if namespace == identity.NamespaceUser || namespace == identity.NamespaceServiceAccount {
|
||||
req.Header.Set(UserHeaderName, user.GetLogin())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user