Skip to content
Snippets Groups Projects
Commit 81bdf81f authored by Jonathan Seguin's avatar Jonathan Seguin
Browse files

Merge branch 'master' of gitlab.iric.ca:bioinfo_iric/iric-data

parents 8629be55 1c4614ee
No related branches found
No related tags found
No related merge requests found
from django.contrib import admin from django.contrib import admin
from portal.models import Profile
# Register your models here. # Register your models here.
admin.site.register(Profile)
import copy import copy
import logging
from django.contrib.auth import authenticate, login from django.contrib.auth import authenticate, login
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
...@@ -10,14 +11,16 @@ from django.views.generic import ListView ...@@ -10,14 +11,16 @@ from django.views.generic import ListView
from django.views.generic.base import ContextMixin from django.views.generic.base import ContextMixin
from django.views.generic.detail import BaseDetailView, SingleObjectMixin from django.views.generic.detail import BaseDetailView, SingleObjectMixin
from django.views.generic.edit import ModelFormMixin from django.views.generic.edit import ModelFormMixin
from portal.models import (AppSettings, DataFile, Lab, Log, Profile, from portal.models import AppSettings, DataFile, Lab, Log, Profile, ShareGroup
ShareGroup)
logger = logging.getLogger('debug')
class TokenLoginMixin(LoginRequiredMixin): class TokenLoginMixin(LoginRequiredMixin):
def dispatch(self, request, *args, **kwargs): def dispatch(self, request, *args, **kwargs):
if not request.user.is_authenticated: if not request.user.is_authenticated:
user = authenticate(request) user = authenticate(request)
logger.debug(user)
if user: if user:
login(request, user) login(request, user)
else: else:
......
...@@ -20,7 +20,7 @@ graphql-relay==2.0.1 ...@@ -20,7 +20,7 @@ graphql-relay==2.0.1
idna==2.8 idna==2.8
mccabe==0.6.1 mccabe==0.6.1
oauthlib==3.1.0 oauthlib==3.1.0
Pillow==5.3.0 Pillow==8.3.1
promise==2.3 promise==2.3
psycopg2-binary==2.8.4 psycopg2-binary==2.8.4
pyasn1==0.4.4 pyasn1==0.4.4
...@@ -41,5 +41,6 @@ six==1.12.0 ...@@ -41,5 +41,6 @@ six==1.12.0
social-auth-app-django==3.1.0 social-auth-app-django==3.1.0
social-auth-core==3.3.3 social-auth-core==3.3.3
SQLAlchemy==0.8.3 SQLAlchemy==0.8.3
sqlparse==0.4.1
text-unidecode==1.3 text-unidecode==1.3
urllib3==1.24.1 urllib3==1.24.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment