Skip to content

Commit

Permalink
password encryption is handled in UserGroupBackend; Linux login now w…
Browse files Browse the repository at this point in the history
…orking
  • Loading branch information
Michel Käser committed Aug 11, 2015
1 parent e848cd0 commit d4c1ad0
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 106 deletions.
Binary file removed docs/images/_img/django_add_ipython_image.png
Binary file not shown.
91 changes: 0 additions & 91 deletions docs/images/images.md

This file was deleted.

3 changes: 1 addition & 2 deletions ipynbsrv/core/auth/authentication_backends.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from hashlib import md5
from ipynbsrv.contract.errors import AuthenticationError, ConnectionError, \
UserNotFoundError
from ipynbsrv.core.helpers import get_internal_ldap_connected, get_user_backend_connected
Expand Down Expand Up @@ -42,7 +41,7 @@ def authenticate(self, username=None, password=None):
if user is not None: # existing user
if not user.check_password(password):
user.set_password(password) # XXX: not needed. should we leave it empty?
internal_ldap.set_user_password(username, md5(password).hexdigest())
internal_ldap.set_user_password(username, password)
user.save()
else: # new user
uid = BackendUser.generate_internal_uid()
Expand Down
2 changes: 0 additions & 2 deletions ipynbsrv/core/signals/backend_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ def create_public_directory(sender, user, **kwargs):
storage_backend.set_dir_mode(public_dir, 0755)
except StorageBackendError as ex:
raise ex
else:
logger.warn("Public directory for user %s already exists." % user.django_user.get_username())


@receiver(backend_user_deleted)
Expand Down
2 changes: 1 addition & 1 deletion lib/scripts/create_postgresql_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi

CT_NAME="ipynbsrv.postgresql"
CT_NAME="ipynbsrv_postgresql"

echo "------------------------------------------------------------"
echo "Pulling the PostgreSQL server image..."
Expand Down
7 changes: 3 additions & 4 deletions lib/scripts/create_wui_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ docker run \
-t -i \
--name="${CT_NAME}" \
--link ipynbsrv_ldap:ipynbsrv_ldap --link ipynbsrv_postgresql:ipynbsrv_postgresql \
phusion/baseimage:0.9.16 /bin/bash
phusion/baseimage:0.9.17 /bin/bash

echo "------------------------------------------------------------"
echo "Committing the WUI container so we can create a new one from it..."
echo "------------------------------------------------------------"
sleep 2

docker commit $CT_NAME ipynbsrv/wui:init
docker commit $CT_NAME ipynbsrv/wui:install
docker rm $CT_NAME

echo "------------------------------------------------------------"
Expand All @@ -46,6 +46,5 @@ docker run \
--name="${CT_NAME}" \
-p 80:80 \
--link ipynbsrv_ldap:ipynbsrv_ldap --link ipynbsrv_postgresql:ipynbsrv_postgresql \
-v /srv/ipynbsrv/homes:/srv/ipynbsrv/data/homes -v /srv/ipynbsrv/public:/srv/ipynbsrv/data/public \
-v /srv/ipynbsrv/shares:/srv/ipynbsrv/data/shares \
-v /srv/ipynbsrv/data:/srv/ipynbsrv/data \
ipynbsrv/wui:init $CMD
6 changes: 0 additions & 6 deletions lib/scripts/setup_docker_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ if [ $PS == "deb" ]; then
# autostart on boot
update-rc.d docker defaults
update-rc.d docker enable
# enable memory and swap accounting (not used yet, --memory=limit)
sed -i 's/GRUB_CMDLINE_LINUX="find_preseed=\/preseed.cfg noprompt"/GRUB_CMDLINE_LINUX="find_preseed=\/preseed.cfg noprompt cgroup_enable=memory swapaccount=1"/' /etc/default/grub
update-grub
else
$INSTALL docker
systemctl start docker.service
Expand All @@ -60,9 +57,6 @@ curl --fail -L -O https://github.com/phusion/baseimage-docker/archive/master.tar
tar xzf master.tar.gz
./baseimage-docker-master/install-tools.sh
rm -rf master.tar.gz baseimage-docker-master
# pull the base image for our templates
docker pull phusion/baseimage:0.9.15
docker pull phusion/baseimage:0.9.16

# create the data directories
DATA="/srv/ipynbsrv"
Expand Down

0 comments on commit d4c1ad0

Please sign in to comment.