Commit 31e8ac83 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by stevanradakovic

Remove the dependency on django-hijack

This is not of much use and the package is going to be removed from Debian.
Signed-off-by: Rémi Duraffort's avatarRémi Duraffort <remi.duraffort@linaro.org>
parent bcaca0fa
......@@ -52,7 +52,7 @@ Depends: apache2, adduser, gunicorn3, iproute2, python3-setuptools,
lava-common (>= ${source:Version}), ${python3:Depends}, ${misc:Depends}
Recommends: ntp, openssh-client,
lava-coordinator, lava-server-doc, lava-dispatcher,
Suggests: lavacli, python3-django-hijack, python3-django-debug-toolbar
Suggests: lavacli, python3-django-debug-toolbar
Description: Linaro Automated Validation Architecture server
LAVA is a continuous integration system for deploying operating
systems onto physical and virtual hardware for running tests.
......
......@@ -182,7 +182,6 @@ LAVA administration guide
ipmi-pxe-deploy
ipxe
proxy
hijack-user
vland-admin
pipeline-debug
docker-admin
......
.. _hijack_user:
Switch / Hijack User
====================
The superuser in LAVA can be enabled to hijack or switch and work on behalf of
other users without knowing their credentials. This comes in handy when users
report problems in their login and the superuser wants to reproduce it. This
functionality is enabled by django-hijack module.
.. note:: Once a user is hijacked by the superuser, the hijack remains in
effect until the superuser logs out of the hijacked user in LAVA and logs
back in.
django-hijack depends on django-compat and both these modules should
be installed in order to enable this support. These packages are
optional for LAVA and are not installed by default.
Install `python-django-compat` and `python-django-hijack` packages directly
using apt if either of production-repo or staging-repo are configured already
using `images.validation.linaro.org` See :ref:`lava_repositories` and
:ref:`lava_archive_signing_key`.
Once the above packages are installed, restart apache webserver for the changes
to take effect::
$ sudo service apache2 restart
Hijack by calling URLs in the browser's address bar
***************************************************
Users can be hijacked directly from the address bar by typing:
* http://example.com/hijack/email/{email-address}
* http://example.com/hijack/username/{username}
* http://example.com/hijack/{user-id}
.. note:: Replace `example.com` with your LAVA instance's hostname.
Read more about django-hijack in
https://github.com/arteria/django-hijack#django-hijack
......@@ -136,7 +136,7 @@ TESTCASE_COUNT_LIMIT = 10000
LOGIN_REDIRECT_URL = "/"
# Automatically install some applications
for module_name in ["devserver", "django_extensions", "django_openid_auth", "hijack"]:
for module_name in ["devserver", "django_extensions", "django_openid_auth"]:
with contextlib.suppress(ImportError):
imp.find_module(module_name)
INSTALLED_APPS.append(module_name)
......
......@@ -17,8 +17,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with LAVA. If not, see <http://www.gnu.org/licenses/>.
import contextlib
from django.views.generic import TemplateView
from django.conf import settings
from django.conf.urls import include, url
......@@ -142,8 +140,3 @@ if settings.USE_DEBUG_TOOLBAR:
import debug_toolbar
urlpatterns.append(url(r"^__debug__/", include(debug_toolbar.urls)))
with contextlib.suppress(ImportError):
from hijack.urls import urlpatterns as hijack_urlpatterns
urlpatterns.append(url(r"^hijack/", include(hijack_urlpatterns)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment