mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
setting proper error message in policy validation for userinfo not allowed when background mode is set to true
This commit is contained in:
parent
3343d73b76
commit
2b12f2a780
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ func Validate(p kyverno.ClusterPolicy) error {
|
|||
// policy.spec.background -> "true"
|
||||
// - cannot use variables with request.userInfo
|
||||
// - cannot define userInfo(roles, cluserRoles, subjects) for filtering (match & exclude)
|
||||
return fmt.Errorf("userInfo not allowed in background policy mode. Failure path %s", err)
|
||||
return fmt.Errorf("userInfo is not allowed in match or exclude when backgroud policy mode is true. Set spec.background=false to disable the policy runs in background mode. Failure path %s ", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue