Bring back authentication
This commit is contained in:
parent
48cfa9a029
commit
ceb931519d
@ -5,3 +5,5 @@ data_root = ./collections
|
|||||||
base_url = /sync/
|
base_url = /sync/
|
||||||
base_media_url = /msync/
|
base_media_url = /msync/
|
||||||
auth_db_path = ./auth.db
|
auth_db_path = ./auth.db
|
||||||
|
# optional, for session persistence between restarts
|
||||||
|
session_db_path = ./session.db
|
||||||
|
|||||||
@ -372,8 +372,17 @@ class SyncApp(object):
|
|||||||
self.hook_download = None
|
self.hook_download = None
|
||||||
self.hook_upload = None
|
self.hook_upload = None
|
||||||
|
|
||||||
self.session_manager = SimpleSessionManager()
|
if config.has_option("sync_app", "session_db_path"):
|
||||||
self.user_manager = SimpleUserManager()
|
self.session_manager = SqliteSessionManager(config.get("sync_app", "session_db_path"))
|
||||||
|
else:
|
||||||
|
self.session_manager = SimpleSessionManager()
|
||||||
|
|
||||||
|
if config.has_option("sync_app", "auth_db_path"):
|
||||||
|
self.user_manager = SqliteUserManager(config.get("sync_app", "auth_db_path"))
|
||||||
|
else:
|
||||||
|
print "WARNING: auth_db_path not set, ankisyncd will accept any password"
|
||||||
|
self.user_manager = SimpleUserManager()
|
||||||
|
|
||||||
self.collection_manager = getCollectionManager()
|
self.collection_manager = getCollectionManager()
|
||||||
|
|
||||||
# make sure the base_url has a trailing slash
|
# make sure the base_url has a trailing slash
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user