add err info to authorize in psp

pull/6/head
xilabao 2016-12-15 14:41:24 +08:00
parent db867c0c9d
commit 35d926d8d3
1 changed files with 4 additions and 1 deletions

View File

@ -337,7 +337,10 @@ func authorizedForPolicy(info user.Info, policy *extensions.PodSecurityPolicy, a
return true
}
attr := buildAttributes(info, policy)
allowed, _, _ := authz.Authorize(attr)
allowed, reason, err := authz.Authorize(attr)
if err != nil {
glog.V(5).Infof("cannot authorized for policy: %v,%v", reason, err)
}
return allowed
}