Skip to content

Commit

Permalink
temporarily disable saml support (#597, #880)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Jan 5, 2024
1 parent 30df804 commit d3b3ed3
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 48 deletions.
6 changes: 4 additions & 2 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
'dal', # For user search combo box
'dal_select2',
'dj_iconify.apps.DjIconifyConfig', # Iconify for SVG icons
'django_saml2_auth', # SAML2 support
# 'django_saml2_auth', # SAML2 support, temp disabled (see #597, #880)
]

# Project apps
Expand Down Expand Up @@ -433,7 +433,9 @@
# ------------------------------------------------------------------------------


ENABLE_SAML = env.bool('ENABLE_SAML', False)
# SAML support temporarily disabled (see #597, #880)
ENABLE_SAML = False # env.bool('ENABLE_SAML', False)

SAML2_AUTH = {
# Required setting
# Pysaml2 Saml client settings
Expand Down
95 changes: 52 additions & 43 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,59 @@
from django.urls import path
from django.views import defaults as default_views

import django_saml2_auth.views
# SAML support temporarily disabled (see #597, #880)
# import django_saml2_auth.views

# Projectroles dependency
from projectroles.views import HomeView


urlpatterns = [
path(route='', view=HomeView.as_view(), name='home'),
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# Login and logout
path(
route='login/',
view=auth_views.LoginView.as_view(template_name='users/login.html'),
name='login',
),
path(route='logout/', view=auth_views.logout_then_login, name='logout'),
# Auth
path('api/auth/', include('knox.urls')),
# Iconify SVG icons
path('icons/', include('dj_iconify.urls')),
# Projectroles URLs
path('project/', include('projectroles.urls')),
# Admin Alerts URLs
path('alerts/adm/', include('adminalerts.urls')),
# App Alerts URLs
path('alerts/app/', include('appalerts.urls')),
# Background Jobs URLs
path('bgjobs/', include('bgjobs.urls')),
# Filesfolders URLs
path('files/', include('filesfolders.urls')),
# django-db-file-storage URLs (obfuscated for users)
path('DJANGO-DB-FILE-STORAGE-CHANGE-ME/', include('db_file_storage.urls')),
# Site Info URLs
path('siteinfo/', include('siteinfo.urls')),
# SODAR Cache app
path('cache/', include('sodarcache.urls')),
# Timeline URLs
path('timeline/', include('timeline.urls')),
# API Tokens URLs
path('tokens/', include('tokens.urls')),
# User Profile URLs
path('user/', include('userprofile.urls')),
# Example project app URLs
path('examples/project/', include('example_project_app.urls')),
# Example site app URLs
path('examples/site/', include('example_site_app.urls')),
urlpatterns = (
[
path(route='', view=HomeView.as_view(), name='home'),
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# Login and logout
path(
route='login/',
view=auth_views.LoginView.as_view(template_name='users/login.html'),
name='login',
),
path(route='logout/', view=auth_views.logout_then_login, name='logout'),
# Auth
path('api/auth/', include('knox.urls')),
# Iconify SVG icons
path('icons/', include('dj_iconify.urls')),
# Projectroles URLs
path('project/', include('projectroles.urls')),
# Admin Alerts URLs
path('alerts/adm/', include('adminalerts.urls')),
# App Alerts URLs
path('alerts/app/', include('appalerts.urls')),
# Background Jobs URLs
path('bgjobs/', include('bgjobs.urls')),
# Filesfolders URLs
path('files/', include('filesfolders.urls')),
# django-db-file-storage URLs (obfuscated for users)
path(
'DJANGO-DB-FILE-STORAGE-CHANGE-ME/', include('db_file_storage.urls')
),
# Site Info URLs
path('siteinfo/', include('siteinfo.urls')),
# SODAR Cache app
path('cache/', include('sodarcache.urls')),
# Timeline URLs
path('timeline/', include('timeline.urls')),
# API Tokens URLs
path('tokens/', include('tokens.urls')),
# User Profile URLs
path('user/', include('userprofile.urls')),
# Example project app URLs
path('examples/project/', include('example_project_app.urls')),
# Example site app URLs
path('examples/site/', include('example_site_app.urls')),
# SAML support temporarily disabled (see #597, #880)
'''
# These are the SAML2 related URLs. You can change "^saml2_auth/" regex to
# any path you want, like "^sso_auth/", "^sso_login/", etc. (required)
path('saml2_auth/', include('django_saml2_auth.urls')),
Expand All @@ -69,7 +75,10 @@
path('sso/logout/', django_saml2_auth.views.signout),
# The following line will replace the default admin user logout with the signout page (optional)
path('sso/admin/logout/', django_saml2_auth.views.signout),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
''',
]
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
)


if settings.DEBUG:
Expand Down
2 changes: 1 addition & 1 deletion projectroles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.db import models
from django.db.models import Q
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from djangoplugins.models import Plugin
from markupfield.fields import MarkupField
Expand Down
5 changes: 3 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ setuptools>=67.6.0, <67.7
packaging>=23.0, <24.0

# Django
django>=3.2.23, <3.3
django==4.0.10

# Configuration
django-environ>=0.10.0, <0.11
Expand Down Expand Up @@ -49,7 +49,8 @@ versioneer==0.28
######################

# Django-plugins (with Django v3.0+ support)
django-plugins-bihealth==0.4.0
# django-plugins-bihealth==0.4.0
-e git+https://github.com/bihealth/django-plugins.git@46537f5d10e385b64e576b077dce8c541556e6ba#egg=django-plugins-bihealth

# Rules for permissions
rules>=3.3, <3.4
Expand Down

0 comments on commit d3b3ed3

Please sign in to comment.