Skip to content

Commit

Permalink
Make hiding cloud tab configurable via env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalkosla101 committed Mar 8, 2023
1 parent 21bd2f0 commit a9cee10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ EMAIL_SIGNATURE="Regards, The Development Team"
FOOTER_MANAGED_BY="DataShare Lab"
FOOTER_SUPPORTED_BY="people"
FOOTER_ACCESSIBILITY_PAGE=
HIDE_ACCOUNT_CLOUD_TAB=False

# Single Sign-On
ENABLE_SSO="False"
Expand Down
1 change: 1 addition & 0 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
SSO_REMOTE_USER_HEADER = config('SSO_REMOTE_USER_HEADER', default='HTTP_REMOTE_USER')
SSO_LOGIN_BUTTON_TEXT = config('SSO_LOGIN_BUTTON_TEXT', default='Login')
GCS_SIGNED_URL_LIFETIME_IN_MINUTES = config('GCS_SIGNED_URL_LIFETIME_IN_MINUTES', default=1440, cast=int)
HIDE_ACCOUNT_CLOUD_TAB = config('HIDE_ACCOUNT_CLOUD_TAB', default=False, cast=bool)


# Application definition
Expand Down
2 changes: 1 addition & 1 deletion physionet-django/user/templatetags/user_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@register.inclusion_tag('user/settings_tabs.html')
def settings_tabs(hide_password_settings: bool):
default_tabs = ['Profile', 'Emails', 'Username', 'Cloud', 'ORCID', 'Credentialing', 'Training', 'Agreements']
if settings.ENABLE_RESEARCH_ENVIRONMENTS:
if settings.HIDE_ACCOUNT_CLOUD_TAB:
default_tabs.remove('Cloud')
if not hide_password_settings:
default_tabs.insert(1, 'Password')
Expand Down

0 comments on commit a9cee10

Please sign in to comment.