Fix process listing

This commit is contained in:
Ingo Oppermann 2025-07-09 16:50:55 +02:00
parent 31a9fa6a5f
commit 260092d024
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -322,7 +322,6 @@ func (h *ClusterHandler) NodeFSDeleteFile(c echo.Context) error {
// @ID cluster-3-list-node-processes
// @Produce json
// @Param id path string true "Node ID"
// @Param domain query string false "Domain to act on"
// @Param filter query string false "Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output."
// @Param reference query string false "Return only these process that have this reference value. If empty, the reference will be ignored."
// @Param id query string false "Comma separated list of process ids to list. Overrides the reference. If empty all IDs will be returned."
@ -345,7 +344,6 @@ func (h *ClusterHandler) NodeListProcesses(c echo.Context) error {
wantids := strings.FieldsFunc(util.DefaultQuery(c, "id", ""), func(r rune) bool {
return r == rune(',')
})
domain := util.DefaultQuery(c, "domain", "")
idpattern := util.DefaultQuery(c, "idpattern", "")
refpattern := util.DefaultQuery(c, "refpattern", "")
ownerpattern := util.DefaultQuery(c, "ownerpattern", "")
@ -359,7 +357,6 @@ func (h *ClusterHandler) NodeListProcesses(c echo.Context) error {
procs, err := peer.Core().ProcessList(node.ProcessListOptions{
ID: wantids,
Filter: filter,
Domain: domain,
Reference: reference,
IDPattern: idpattern,
RefPattern: refpattern,
@ -373,7 +370,7 @@ func (h *ClusterHandler) NodeListProcesses(c echo.Context) error {
processes := []api.Process{}
for _, p := range procs {
if !h.iam.Enforce(ctxuser, domain, "process", p.ID, "read") {
if !h.iam.Enforce(ctxuser, p.Domain, "process", p.ID, "read") {
continue
}