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

Remove scope, oauth_callback_url during upgrade step #997

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions qhub/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def _version_specific_upgrade(
return config


class Upgrade_0_3_14(UpgradeStep):
version = "0.3.14"
class Upgrade_0_4_0(UpgradeStep):
version = "0.4.0"

def _version_specific_upgrade(
self, config, start_version, config_filename: pathlib.Path, *args, **kwargs
Expand Down Expand Up @@ -309,6 +309,15 @@ def _version_specific_upgrade(
if "project" in config["azure"]:
del config["azure"]["project"]

# "oauth_callback_url" and "scope" not required in qhub-config.yaml
# for Auth0 and Github authentication
auth_config = config["security"]["authentication"].get("config", None)
if auth_config:
if "oauth_callback_url" in auth_config:
del auth_config["oauth_callback_url"]
if "scope" in auth_config:
del auth_config["scope"]

return config


Expand Down
2 changes: 1 addition & 1 deletion qhub/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.14"
__version__ = "0.4.0"

if __name__ == "__main__":
print(__version__, end="")