From 9ce77e4e7b7b9e25492301b948f07399d1f6140c Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 16 Oct 2026 11:25:34 +0200 Subject: [PATCH] issue 900: node-files descriptions follow ADR 0394 (operator account, writes do not refuse secret places, overwrite keeps trash) --- internal/catalogue/files.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/catalogue/files.go b/internal/catalogue/files.go index 90f7c103..2307ea15 100644 --- a/internal/catalogue/files.go +++ b/internal/catalogue/files.go @@ -35,17 +35,15 @@ func filesVerbs() []Verb { for _, v := range readsVerbs() { v.Description = strings.Replace(v.Description, "Read as the holder's own account, which holds no secret: a component it may not reach says so.", - "Read "+filesAsAccount+".", 1) - if !strings.Contains(v.Description, filesAsAccount) { - v.Description += " Read " + filesAsAccount + "." - } + "", 1) + v.Description = strings.TrimSpace(v.Description) + " Read " + filesAsAccount + "." verbs = append(verbs, v) } write := func(name, description string, in map[string]string, required []string, optional []string, replaces ...string) Verb { in["reason"] = "why the file is changed, for the audit trail" in["override"] = overrideWord - return Verb{Name: name, Description: description + " Refuses a place a secret is kept, and a path a module " + - "owns unless override names a reason; changed " + filesAsAccount + ".", + return Verb{Name: name, Description: description + " Refuses a path a module owns " + + "unless override names a reason; done as the node's operator account, through sudo -n where its rights do not reach.", Input: schema(in, append(required, "reason"), append(optional, "override")...), Replaces: replaces} } return append(verbs, @@ -54,10 +52,12 @@ func filesVerbs() []Verb { "mode": "the file's mode, such as 0644 (optional)"}, []string{"path", "content"}, []string{"mode"}, "tee", ">"), write("copy", "Copy a file or directory to a path on this node. A target on another node (:/path) is "+ - "refused: copying between nodes comes in step 2.", + "refused: copying between nodes comes in step 2 (issue 903). An existing target is overwritten, the old one " + + "kept in the node's trash for 7 days.", map[string]string{"from": "an absolute path", "to": "an absolute path on this node"}, []string{"from", "to"}, nil, "cp", "cp -a", "ssh cp"), - write("move", "Move or rename a file or directory.", + write("move", "Move or rename a file or directory. A target on another node is refused: copying between nodes "+ + "comes in step 2 (issue 903). An existing target is overwritten, the old one kept in the node's trash for 7 days.", map[string]string{"from": "an absolute path", "to": "an absolute path"}, []string{"from", "to"}, nil, "mv"), write("delete", "Delete a file or directory into the node's trash, where restore can bring it back.",