Skip to content

Fix dump-users #172

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions parts/22-query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4620,26 +4620,28 @@ query_dump-users() { ##? [--apikey] [--email] : Dump the list of users and their
EOF

if [[ -n "$arg_email" ]]; then
email=",$(gdpr_safe email email)"
email=",$(gdpr_safe email u.email)"
else
email=""
fi

if [[ -n "$arg_apikey" ]]; then
apikey="apikey"
apikeyjoin="left join api_keys "
apikey=",ak.key"
apikeyjoin="left join api_keys ak on ak.user_id = u.id"
else
email=""
apikey=""
apikeyjoin=""
fi

read -r -d '' QUERY <<-EOF
SELECT
username
u.username
$email
$apikey
FROM
galaxy_user
galaxy_user u $apikeyjoin
ORDER BY
id desc
u.id desc
EOF
}

Expand Down
Loading