portainer/portainer · error · httperror.HandlerError
Stack management is disabled for non-admin users
Error message
Stack management is disabled for non-admin users
What it means
Error "Stack management is disabled for non-admin users" thrown in portainer/portainer.
Source
Thrown at api/http/handler/stacks/stack_inspect.go:66
return httperror.InternalServerError("Unable to retrieve info from request context", err)
}
endpoint, err := handler.DataStore.Endpoint().Endpoint(stack.EndpointID)
if handler.DataStore.IsErrObjectNotFound(err) {
if !securityContext.IsAdmin {
return httperror.NotFound("Unable to find an environment with the specified identifier inside the database", err)
}
} else if err != nil {
return httperror.InternalServerError("Unable to find an environment with the specified identifier inside the database", err)
}
canManage, err := handler.userCanManageStacks(securityContext, endpoint)
if err != nil {
return httperror.InternalServerError("Unable to verify user authorizations to validate stack deletion", err)
}
if !canManage {
errMsg := "Stack management is disabled for non-admin users"
return httperror.Forbidden(errMsg, errors.New(errMsg))
}
if endpoint != nil {
err = handler.requestBouncer.AuthorizedEndpointOperation(r, endpoint)
if err != nil {
return httperror.Forbidden("Permission denied to access environment", err)
}
if stack.Type == portainer.DockerSwarmStack || stack.Type == portainer.DockerComposeStack {
resourceControl, err := handler.DataStore.ResourceControl().ResourceControlByResourceIDAndType(stackutils.ResourceControlID(stack.EndpointID, stack.Name), portainer.StackResourceControl)
if err != nil {
return httperror.InternalServerError("Unable to retrieve a resource control associated to the stack", err)
}
access, err := handler.userCanAccessStack(securityContext, resourceControl)
if err != nil {
return httperror.InternalServerError("Unable to verify user authorizations to validate stack access", err)
}View on GitHub (pinned to 17e74456ff)
When it happens
Trigger: Thrown at api/http/handler/stacks/stack_inspect.go:66 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26).
Data as JSON: /api/errors/acb91945c825ba21.
Report an issue: GitHub.