diff options
author | mkaay <mkaay@mkaay.de> | 2011-02-05 14:19:22 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-02-05 14:19:22 +0100 |
commit | 7c332ae610f7feca193ba50ea900f5a417681a7b (patch) | |
tree | e71f1ba6b8eb52f13c11289069d65288b17a111c /pyLoadCore.py | |
parent | py 2.5 fix -> removed import (diff) | |
download | pyload-7c332ae610f7feca193ba50ea900f5a417681a7b.tar.xz |
created unified authentication system (same data for webinterface an GUI/CLI, multiple accounts)
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 4cf2cdad6..e08c4c544 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -63,6 +63,7 @@ from module.JsEngine import JsEngine from module.remote.RemoteManager import RemoteManager from module.DatabaseBackend import DatabaseBackend from module.FileDatabase import FileHandler +from module.UserDatabase import UserMethods from codecs import getwriter if os.name == "nt": @@ -310,6 +311,9 @@ class Core(object): self.check_install("OpenSSL", _("OpenSSL for secure connection"), True) self.setupDB() + if self.config.oldRemoteData: + self.log.info(_("Moving old user config to DB")) + self.db.addUser(self.config.oldRemoteData["username"], self.config.oldRemoteData["password"]) self.requestFactory = RequestFactory(self) __builtin__.pyreq = self.requestFactory @@ -862,6 +866,9 @@ class ServerMethods(): def restart_failed(self): """ restart all failed links """ self.core.files.restartFailed() + + def checkAuth(self, username, password): + return self.core.db.checkAuth(username, password) def deamon(): try: |