-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix(plugin-access-manager): set Casdoor initDataNewOnly=true to preserve API state #1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,4 +19,5 @@ data: | |
| enableGzip: "true" | ||
| quota: '{"organization": -1, "user": -1, "application": -1, "provider": -1}' | ||
| logConfig: '{"filename": "logs/casdoor.log", "maxdays": 99999, "perm": "0770"}' | ||
| initDataFile: {{ .Values.auth.backend.initDataFile | default "./init_data.json" | quote }} | ||
| initDataFile: {{ .Values.auth.backend.initDataFile | default "./init_data.json" | quote }} | ||
| initDataNewOnly: {{ .Values.auth.backend.initDataNewOnly | default "true" | quote }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Check if initDataNewOnly is documented in values.yaml
# Search for initDataNewOnly in values.yaml files
fd -t f 'values.yaml' charts/plugin-access-manager/ --exec rg -n 'initDataNewOnly' {} \;
# Also check for the auth.backend.initDataNewOnly path
fd -t f 'values.yaml' charts/plugin-access-manager/ --exec cat {} \; | grep -A5 -B5 'backend:' | grep -i 'initData'Repository: LerianStudio/helm Length of output: 43 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Find all usages of initDataNewOnly anywhere in the repo
echo "== RG initDataNewOnly =="
rg -n --hidden --no-ignore initDataNewOnly . || true
# 2) Locate values.yaml files for this chart (and nearby charts)
echo
echo "== values.yaml files under charts/plugin-access-manager =="
fd -t f 'values.yaml' charts/plugin-access-manager --full-path
# 3) For each discovered values.yaml under that chart, show whether auth.backend exists
echo
echo "== auth.backend section context in chart values.yaml files =="
while IFS= read -r f; do
echo "--- $f ---"
# Show lines around "auth:" and "backend:" and "initData"
rg -n '(^|[[:space:]])auth:|(^|[[:space:]])backend:' "$f" || true
rg -n 'initData' "$f" || true
done < <(fd -t f 'values.yaml' charts/plugin-access-manager --full-path)
# 4) Also check chart-level defaults if they exist elsewhere (e.g., values/*.yaml)
echo
echo "== Any files under plugin-access-manager named values*.yaml =="
fd -t f 'values*.ya?ml' charts/plugin-access-manager --full-pathRepository: LerianStudio/helm Length of output: 485 🏁 Script executed: #!/bin/bash
set -euo pipefail
VALUES_FILE="charts/plugin-access-manager/values.yaml"
echo "== initDataNewOnly in values.yaml =="
rg -n 'initDataNewOnly' "$VALUES_FILE" || true
echo
echo "== auth.backend block vicinity in values.yaml =="
# Print a small window around any auth/backend occurrence
rg -n '(^|[[:space:]])auth:|(^|[[:space:]])backend:' "$VALUES_FILE" || true
echo
echo "== Attempt to show lines around auth/backend keys (if present) =="
# If file is small enough, show a larger slice for manual reading
python3 - <<'PY'
import itertools
path="charts/plugin-access-manager/values.yaml"
with open(path,'r',encoding='utf-8') as f:
lines=f.readlines()
# Print up to first 200 lines (usually enough for auth config in values.yaml)
for i,line in enumerate(lines[:200], start=1):
if any(k in line for k in ["auth:", "backend:", "initData"]):
print(f"{i:4d}:{line.rstrip()}")
PYRepository: LerianStudio/helm Length of output: 339 🏁 Script executed: #!/bin/bash
set -euo pipefail
VALUES_FILE="charts/plugin-access-manager/values.yaml"
echo "== initData occurrences in values.yaml =="
rg -n 'initData' "$VALUES_FILE" || true
echo
echo "== Show auth/backend sections around the reported lines =="
# Dump ~60 lines around each occurrence of "backend:" and each "auth:" occurrence after/before
python3 - <<'PY'
path="charts/plugin-access-manager/values.yaml"
with open(path,'r',encoding='utf-8') as f:
lines=f.readlines()
def dump_around(center, half=35):
start=max(center-half,1)
end=min(center+half,len(lines))
for i in range(start,end+1):
print(f"{i:4d}:{lines[i-1].rstrip()}")
for c in [144, 289, 383, 424]:
print("\n--- context around", c, "---")
dump_around(c, half=35)
PYRepository: LerianStudio/helm Length of output: 9705 Document initDataNewOnly: {{ .Values.auth.backend.initDataNewOnly | default "true" | quote }}…but 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
Consider splitting the
quoteaddition into a separate commit.While adding
quotetoinitDataFileis a good practice, it's technically a separate change from theinitDataNewOnlyaddition. Thequotefunction ensures proper YAML escaping, but this modification could have been isolated for clarity.🤖 Prompt for AI Agents