mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Pass ctx to Validate, ValidateUpdate
Pass ctx to Validate/ValidateUpdate. This is useful so strategies can access data such as the current user.
This commit is contained in:
@@ -45,10 +45,10 @@ func (t *testRESTStrategy) AllowCreateOnUpdate() bool { return t.allowCreateOnUp
|
||||
|
||||
func (t *testRESTStrategy) PrepareForCreate(obj runtime.Object) {}
|
||||
func (t *testRESTStrategy) PrepareForUpdate(obj, old runtime.Object) {}
|
||||
func (t *testRESTStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList {
|
||||
func (t *testRESTStrategy) Validate(ctx api.Context, obj runtime.Object) fielderrors.ValidationErrorList {
|
||||
return nil
|
||||
}
|
||||
func (t *testRESTStrategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList {
|
||||
func (t *testRESTStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) fielderrors.ValidationErrorList {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user