small changes
This commit is contained in:
@@ -30,7 +30,7 @@ def document(request, id=None):
|
||||
author = epc.createAuthorIfNotExistsFor(
|
||||
name=str(request.user),
|
||||
authorMapper=str(request.user)
|
||||
)['authorID']
|
||||
)
|
||||
|
||||
# Create the session on the etherpad-lite side
|
||||
expires = datetime.datetime.utcnow() + datetime.timedelta(hours=3)
|
||||
@@ -39,7 +39,7 @@ def document(request, id=None):
|
||||
try:
|
||||
result = epclient.createSession(
|
||||
groupID=str(group['groupID']),
|
||||
authorID=str(author),
|
||||
authorID=str(author['authorID']),
|
||||
validUntil=str(int(expires.timestamp()))
|
||||
)
|
||||
except Exception as e:
|
||||
@@ -71,8 +71,9 @@ def document(request, id=None):
|
||||
|
||||
# Delete the existing session first
|
||||
if ('padSessionID' in request.COOKIES):
|
||||
epclient.deleteSession(request.COOKIES['sessionID'])
|
||||
response.delete_cookie('sessionID', server.hostname)
|
||||
print(request.COOKIES['sessionid'])
|
||||
# TODO: epclient.deleteSession(request.COOKIES['sessionid'])
|
||||
response.delete_cookie('sessionid', server.hostname)
|
||||
response.delete_cookie('padSessionID')
|
||||
|
||||
# Set the new session cookie for both the server and the local site
|
||||
|
||||
@@ -50,7 +50,6 @@ DATA_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 1024
|
||||
CKEDITOR_UPLOAD_PATH = 'upload'
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'documents.apps.DocumentsConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.admindocs',
|
||||
'django.contrib.auth',
|
||||
@@ -66,6 +65,7 @@ INSTALLED_APPS = [
|
||||
'django_static_jquery_ui',
|
||||
'posts.apps.PostsConfig',
|
||||
'members.apps.MembersConfig',
|
||||
'documents.apps.DocumentsConfig',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -114,7 +114,7 @@ DATABASES = {
|
||||
}
|
||||
|
||||
AUTHENTICATION_BACKENDS = [
|
||||
'django.contrib.auth.backends.RemoteUserBackend'
|
||||
'django.contrib.auth.backends.RemoteUserBackend',
|
||||
]
|
||||
|
||||
# Password validation
|
||||
|
||||
Reference in New Issue
Block a user