Skip to content

Commit

Permalink
Merge pull request #1006 from maykinmedia/fix/2083-remove-hijack
Browse files Browse the repository at this point in the history
➖ [#2083] Remove django-hijack
  • Loading branch information
stevenbal authored Feb 6, 2024
2 parents 6a9a910 + 00c8ab7 commit a5f2d32
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 40 deletions.
1 change: 0 additions & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Django>=3.2.11<4.0
django-admin-index
django-axes
django-filer
django-hijack
django-ordered-model
django-redis
django-rosetta
Expand Down
3 changes: 0 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ django==3.2.23
# django-filer
# django-filter
# django-formtools
# django-hijack
# django-htmx
# django-import-export
# django-localflavor
Expand Down Expand Up @@ -179,8 +178,6 @@ django-formtools==2.3
# via
# django-cms
# maykin-django-two-factor-auth
django-hijack==3.0.4
# via -r requirements/base.in
django-htmx==1.13.0
# via -r requirements/base.in
django-image-cropping==1.7
Expand Down
5 changes: 0 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ django==3.2.23
# django-filer
# django-filter
# django-formtools
# django-hijack
# django-htmx
# django-import-export
# django-localflavor
Expand Down Expand Up @@ -285,10 +284,6 @@ django-formtools==2.3
# -r requirements/base.txt
# django-cms
# maykin-django-two-factor-auth
django-hijack==3.0.4
# via
# -c requirements/base.txt
# -r requirements/base.txt
django-htmx==1.13.0
# via
# -c requirements/base.txt
Expand Down
5 changes: 0 additions & 5 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ django==3.2.23
# django-filer
# django-filter
# django-formtools
# django-hijack
# django-htmx
# django-import-export
# django-localflavor
Expand Down Expand Up @@ -324,10 +323,6 @@ django-formtools==2.3
# -r requirements/ci.txt
# django-cms
# maykin-django-two-factor-auth
django-hijack==3.0.4
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
django-htmx==1.13.0
# via
# -c requirements/ci.txt
Expand Down
13 changes: 0 additions & 13 deletions src/open_inwoner/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@
"sniplates",
"digid_eherkenning",
"eherkenning",
# "hijack.contrib.admin", # This should be imported but it causes an error. So now there are
# "hijack",
"localflavor",
"easy_thumbnails", # used by filer
"image_cropping",
Expand Down Expand Up @@ -247,7 +245,6 @@
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"axes.middleware.AxesMiddleware",
"hijack.middleware.HijackUserMiddleware",
"django_otp.middleware.OTPMiddleware",
"django.middleware.locale.LocaleMiddleware",
"cms.middleware.utils.ApphookReloadMiddleware",
Expand Down Expand Up @@ -643,16 +640,6 @@

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

#
# DJANGO-HIJACK
#
HIJACK_LOGIN_REDIRECT_URL = "/"
HIJACK_LOGOUT_REDIRECT_URL = reverse_lazy("admin:accounts_user_changelist")
HIJACK_REGISTER_ADMIN = False
# This is a CSRF-security risk.
# See: http://django-hijack.readthedocs.io/en/latest/configuration/#allowing-get-method-for-hijack-views
HIJACK_ALLOW_GET_REQUESTS = True

#
# SENTRY - error monitoring
#
Expand Down
12 changes: 0 additions & 12 deletions src/open_inwoner/templates/hijack/contrib/admin/button.html

This file was deleted.

1 change: 0 additions & 1 deletion src/open_inwoner/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
auth_views.PasswordResetCompleteView.as_view(),
name="password_reset_complete",
),
path("admin/hijack/", include("hijack.urls")),
path("admin/login/failure/", AdminLoginFailure.as_view(), name="admin-oidc-error"),
path("admin/", admin.site.urls),
path("csp/", include("cspreports.urls")),
Expand Down

0 comments on commit a5f2d32

Please sign in to comment.