Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hervé MENAGER
galaxy-cwl-is-docker
Commits
11d240ed
Commit
11d240ed
authored
Jun 14, 2019
by
Hervé MENAGER
Browse files
add script to automate creating the admin user
parent
ae04dfc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
create_user.py
0 → 100644
View file @
11d240ed
# this script is based on @jmchilton's preseed.py (https://gist.github.com/jmchilton/1979583)
# it creates the admin user and sets an API key for it.
from
scripts.db_shell
import
*
admin_user
=
User
(
"galaxy@commonwl.org"
)
admin_user
.
set_password_cleartext
(
"galaxy"
)
sa_session
.
add
(
admin_user
)
sa_session
.
flush
()
admin_key
=
APIKeys
()
admin_key
.
user_id
=
admin_user
.
id
print
'Setting admin id as %s'
%
admin_user
.
id
admin_key
.
key
=
'111111111111111111111'
sa_session
.
add
(
admin_key
)
sa_session
.
flush
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment