- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for NewBadRequest (0.34 sec)
-
pkg/registry/authorization/selfsubjectrulesreview/rest.go
if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("not a SelfSubjectRulesReview: %#v", obj)) } user, ok := genericapirequest.UserFrom(ctx) if !ok { return nil, apierrors.NewBadRequest("no user present on request") } namespace := selfSRR.Spec.Namespace if namespace == "" { return nil, apierrors.NewBadRequest("no namespace on request") } if createValidation != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 3.7K bytes - Viewed (0) -
pkg/registry/authorization/localsubjectaccessreview/rest.go
} namespace := genericapirequest.NamespaceValue(ctx) if len(namespace) == 0 { return nil, apierrors.NewBadRequest(fmt.Sprintf("namespace is required on this type: %v", namespace)) } if namespace != localSubjectAccessReview.Namespace { return nil, apierrors.NewBadRequest(fmt.Sprintf("spec.resourceAttributes.namespace must match namespace: %v", namespace)) } if createValidation != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 3.2K bytes - Viewed (0) -
pkg/registry/authentication/tokenreview/storage.go
if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("not a TokenReview: %#v", obj)) } namespace := genericapirequest.NamespaceValue(ctx) if len(namespace) != 0 { return nil, apierrors.NewBadRequest(fmt.Sprintf("namespace is not allowed on this type: %v", namespace)) } if len(tokenReview.Spec.Token) == 0 { return nil, apierrors.NewBadRequest(fmt.Sprintf("token is required for TokenReview in authentication"))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 3.7K bytes - Viewed (0) -
pkg/registry/authentication/selfsubjectreview/rest.go
return nil, err } } _, ok := obj.(*authenticationapi.SelfSubjectReview) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("not a SelfSubjectReview: %#v", obj)) } user, ok := genericapirequest.UserFrom(ctx) if !ok { return nil, apierrors.NewBadRequest("no user present on request") } extra := user.GetExtra() selfSR := &authenticationapi.SelfSubjectReview{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 23:42:33 UTC 2023 - 2.8K bytes - Viewed (0) -
pkg/registry/authorization/selfsubjectaccessreview/rest.go
if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("not a SelfSubjectAccessReview: %#v", obj)) } if errs := authorizationvalidation.ValidateSelfSubjectAccessReview(selfSAR); len(errs) > 0 { return nil, apierrors.NewInvalid(authorizationapi.Kind(selfSAR.Kind), "", errs) } userToCheck, exists := genericapirequest.UserFrom(ctx) if !exists { return nil, apierrors.NewBadRequest("no user present on request") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 3.1K bytes - Viewed (0) -
pkg/registry/rbac/rolebinding/policybased/storage.go
// The namespace in the object can be empty until StandardStorage.Create()->BeforeCreate() populates it from the context. namespace, ok := genericapirequest.NamespaceFrom(ctx) if !ok { return nil, errors.NewBadRequest("namespace is required") } roleBinding := obj.(*rbac.RoleBinding) if rbacregistry.BindingAuthorized(ctx, roleBinding.RoleRef, namespace, s.authorizer) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 10:11:16 UTC 2022 - 5.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/versioncheck.go
if gvk := appliedObj.GetObjectKind().GroupVersionKind(); gvk != f.gvk { return nil, nil, errors.NewBadRequest(fmt.Sprintf("invalid object type: %v", gvk)) } return f.fieldManager.Apply(liveObj, appliedObj, managed, fieldManager, force)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 16 20:03:48 UTC 2023 - 1.8K bytes - Viewed (0) -
plugin/pkg/admission/priority/admission.go
operation := a.GetOperation() pod, ok := a.GetObject().(*core.Pod) if !ok { return errors.NewBadRequest("resource was marked with kind Pod but was unable to be converted") } if operation == admission.Update { oldPod, ok := a.GetOldObject().(*core.Pod) if !ok { return errors.NewBadRequest("resource was marked with kind Pod but was unable to be converted") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 08 10:11:23 UTC 2022 - 9K bytes - Viewed (0) -
pkg/registry/authorization/subjectaccessreview/rest.go
subjectAccessReview, ok := obj.(*authorizationapi.SubjectAccessReview) if !ok { return nil, apierrors.NewBadRequest(fmt.Sprintf("not a SubjectAccessReview: %#v", obj)) } if errs := authorizationvalidation.ValidateSubjectAccessReview(subjectAccessReview); len(errs) > 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 18 09:21:13 UTC 2022 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/rest/meta.go
return nil case requestNamespace == metav1.NamespaceNone: // cluster-scoped, clear namespace obj.SetNamespace(metav1.NamespaceNone) return nil default: // mismatch, error return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") } } // ExpectedNamespaceForScope returns the expected namespace for a resource, given the request namespace and resource scope.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jun 19 01:47:23 UTC 2022 - 2.7K bytes - Viewed (0)