mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
744 relocating userRequestInfo to top level variable
This commit is contained in:
parent
f8f27cea18
commit
fc84eaaf3b
1 changed files with 1 additions and 7 deletions
|
@ -111,13 +111,7 @@ func (ctx *Context) AddResource(dataRaw []byte) error {
|
|||
|
||||
//AddUserInfo adds userInfo at path request.userInfo
|
||||
func (ctx *Context) AddUserInfo(userRequestInfo kyverno.RequestInfo) error {
|
||||
modifiedResource := struct {
|
||||
Request interface{} `json:"request"`
|
||||
}{
|
||||
Request: userRequestInfo,
|
||||
}
|
||||
|
||||
objRaw, err := json.Marshal(modifiedResource)
|
||||
objRaw, err := json.Marshal(userRequestInfo)
|
||||
if err != nil {
|
||||
ctx.log.Error(err, "failed to marshal the UserInfo")
|
||||
return err
|
||||
|
|
Loading…
Add table
Reference in a new issue