mirror of https://github.com/k3s-io/k3s
remove extra function call
We have read user info from context in previous line. No need to call this function again.pull/6/head
parent
815b340f8d
commit
63346d979c
|
@ -60,7 +60,6 @@ func ConfirmNoEscalation(ctx genericapirequest.Context, ruleResolver Authorizati
|
|||
|
||||
ownerRightsCover, missingRights := Covers(ownerRules, rules)
|
||||
if !ownerRightsCover {
|
||||
user, _ := genericapirequest.UserFrom(ctx)
|
||||
return apierrors.NewUnauthorized(fmt.Sprintf("attempt to grant extra privileges: %v user=%v ownerrules=%v ruleResolutionErrors=%v", missingRights, user, ownerRules, ruleResolutionErrors))
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue