chore(code): clean-up the code BE-12818 (#2260)

This commit is contained in:
andres-portainer
2026-04-08 20:04:27 -03:00
committed by GitHub
parent def415b6f3
commit 8f563220df
30 changed files with 48 additions and 109 deletions
+1 -1
View File
@@ -124,7 +124,7 @@ func (handler *Handler) stackUpdateGit(w http.ResponseWriter, r *http.Request) *
return httperror.InternalServerError("Unable to retrieve a resource control associated to the stack", err)
}
if access, err := handler.userCanAccessStack(securityContext, endpoint.ID, resourceControl); err != nil {
if access, err := handler.userCanAccessStack(securityContext, resourceControl); err != nil {
return httperror.InternalServerError("Unable to verify user authorizations to validate stack access", err)
} else if !access {
return httperror.Forbidden("Access denied to resource", httperrors.ErrResourceAccessDenied)