mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
fix: default the path picker to a folder the user can write to (#12448)
This commit is contained in:
@@ -525,7 +525,9 @@
|
||||
setDirty()
|
||||
meta.ownerKind = v
|
||||
if (v === 'folder') {
|
||||
meta.owner = folders?.[0]?.name ?? ''
|
||||
// Prefer a folder the user can write to: a read-only one cannot
|
||||
// be picked in the list and saving in it is refused.
|
||||
meta.owner = (folders.find((f) => f.write) ?? folders[0])?.name ?? ''
|
||||
} else {
|
||||
// 'group' is unreachable here (Select only offers user/folder)
|
||||
// but validateName still accepts it for forward-compat.
|
||||
|
||||
Reference in New Issue
Block a user