From 89f53458c62ad6380a74d6fa8c28b223ba42ce95 Mon Sep 17 00:00:00 2001 From: Dmitry Salakhov Date: Mon, 21 Jun 2021 09:53:48 +1200 Subject: [PATCH] fix(stack): allow standard users use advanced deployment (#5205) --- api/http/handler/stacks/stack_create.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api/http/handler/stacks/stack_create.go b/api/http/handler/stacks/stack_create.go index 7693746ca..427d4470c 100644 --- a/api/http/handler/stacks/stack_create.go +++ b/api/http/handler/stacks/stack_create.go @@ -14,7 +14,6 @@ import ( portainer "github.com/portainer/portainer/api" bolterrors "github.com/portainer/portainer/api/bolt/errors" gittypes "github.com/portainer/portainer/api/git/types" - httperrors "github.com/portainer/portainer/api/http/errors" "github.com/portainer/portainer/api/http/security" "github.com/portainer/portainer/api/internal/authorization" "github.com/portainer/portainer/api/internal/endpointutils" @@ -113,10 +112,6 @@ func (handler *Handler) stackCreate(w http.ResponseWriter, r *http.Request) *htt case portainer.DockerComposeStack: return handler.createComposeStack(w, r, method, endpoint, tokenData.ID) case portainer.KubernetesStack: - if tokenData.Role != portainer.AdministratorRole { - return &httperror.HandlerError{StatusCode: http.StatusForbidden, Message: "Access denied", Err: httperrors.ErrUnauthorized} - } - return handler.createKubernetesStack(w, r, method, endpoint) }