Skip to content

Commit

Permalink
Update switch-to-grafana-admin.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ch-stark authored Nov 22, 2024
1 parent 7a1337e commit eb289b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/switch-to-grafana-admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ start() {
fi

curlCMD="kubectl exec -it -n "$obs_namespace" $podName -c grafana-dashboard-loader -- /usr/bin/curl"

# this is an internal user for internal configuration purposes not meant for external use. As ACM user you will never login into Grafana this way
XForwardedUser="WHAT_YOU_ARE_DOING_IS_VOIDING_SUPPORT_0000000000000000000000000000000000000000000000000000000000000000"
userID=$($curlCMD -s -X GET -H "Content-Type: application/json" -H "X-Forwarded-User: $XForwardedUser" 127.0.0.1:3001/api/users/lookup?loginOrEmail=$username_no_num_sign | $PYTHON_CMD -c "import sys, json; print(json.load(sys.stdin)['id'])" 2>/dev/null)
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit eb289b9

Please sign in to comment.