From: Felix Dörre Date: Tue, 28 Mar 2017 08:32:55 +0000 (+0200) Subject: fix: gigi does not permit to add oneself as org admin X-Git-Url: https://code.wpia.club/?p=infra.git;a=commitdiff_plain;h=7261fc0db57d8826c79d148e74d06ddada804095 fix: gigi does not permit to add oneself as org admin Change-Id: I638d330216913b68bb09325560c903f94625473c --- diff --git a/bootstrap-user b/bootstrap-user index dc6079c..08c04db 100755 --- a/bootstrap-user +++ b/bootstrap-user @@ -140,9 +140,10 @@ if ! grep -q '^[0-9]\+$' <<< $mgmOid; then fi printf "Management Organisation id is \"%s\"\n" "$mgmOid" -echo "add self as orgadmin for organisation" -csrf=$(mcurl orga/$mgmOid | csrf "head -n 2" "tail -n 1") -mcurl orga/$mgmOid --data-urlencode "email=$adminEmail" --data-urlencode "master=y" --data-urlencode "do_affiliate=Add" --data-urlencode "csrf=$csrf" &>/dev/null +echo "using SQL to add self as orgadmin for organisation" +sudo lxc-attach -n postgres-primary -- su -c "psql -d gigi" postgres <