Skip to content
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

adapt manage_bootstrap_user.py to change in lib/galaxy/web/security introduced in Galaxy release_19.05 #61

Merged
merged 4 commits into from
Sep 29, 2019
Merged
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions files/manage_bootstrap_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
eggs.require("mercurial")

import galaxy.config
from galaxy.web import security

try:
from galaxy.web.security import SecurityHelper as Security
Copy link
Member

@mvdbeek mvdbeek Sep 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you switch this around so that the new import is tried first, and add a comment in the except clause that this maintains backwards compatibility with galaxy versions < 19.05 ? fwiw the PR that modified this was galaxyproject/galaxy#7560

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is done, together with a bit of code cleaning

except ImportError:
from galaxy.security.idencoding import IdEncodingHelper as Security
from galaxy.model import mapping

logging.captureWarnings(True)
Expand All @@ -43,7 +47,7 @@ def __init__(self, config):
self.config.database_connection,
engine_options={},
create_tables=False)
self.security = security.SecurityHelper(id_secret=self.config.id_secret)
self.security = Security(id_secret=self.config.id_secret)

@property
def sa_session(self):
Expand Down