feat(ansible): GIT_ASKPASS per-source HTTP token auth + settings UI
This commit is contained in:
@@ -226,6 +226,9 @@ async def ansible_add_source():
|
||||
entry["pull_interval_seconds"] = int(form.get("pull_interval_seconds", 3600))
|
||||
except ValueError:
|
||||
entry["pull_interval_seconds"] = 3600
|
||||
token = form.get("http_token", "").strip()
|
||||
if token:
|
||||
entry["http_token"] = token
|
||||
else:
|
||||
entry["path"] = form.get("path", "").strip()
|
||||
sources = await _get_ansible_sources()
|
||||
@@ -263,6 +266,12 @@ async def ansible_save_source(idx: int):
|
||||
entry["pull_interval_seconds"] = int(form.get("pull_interval_seconds", 3600))
|
||||
except ValueError:
|
||||
entry["pull_interval_seconds"] = 3600
|
||||
token = form.get("http_token", "").strip()
|
||||
if token:
|
||||
entry["http_token"] = token
|
||||
elif "http_token" in sources[idx]:
|
||||
# Preserve existing token — password fields don't round-trip via browser
|
||||
entry["http_token"] = sources[idx]["http_token"]
|
||||
else:
|
||||
entry["path"] = form.get("path", "").strip()
|
||||
sources[idx] = entry
|
||||
|
||||
Reference in New Issue
Block a user