Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Hervé MENAGER
galaxy-cwl-is-docker
Commits
11d240ed
Commit
11d240ed
authored
Jun 14, 2019
by
Hervé MENAGER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script to automate creating the admin user
parent
ae04dfc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
create_user.py
create_user.py
+15
-0
No files found.
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
Markdown
is supported
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