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 /module/remote/RemoteManager.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 'module/remote/RemoteManager.py')
-rw-r--r-- | module/remote/RemoteManager.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/remote/RemoteManager.py b/module/remote/RemoteManager.py index bc40ea124..fbc7bc5f1 100644 --- a/module/remote/RemoteManager.py +++ b/module/remote/RemoteManager.py @@ -42,6 +42,9 @@ class BackendBase(Thread): def serve(self): pass + + def checkAuth(self, user, password, remoteip=None): + return self.manager.checkAuth(user, password, remoteip) class RemoteManager(): available = ("XMLRPCBackend", ) @@ -65,4 +68,7 @@ class RemoteManager(): else: backend.start() self.backends.append(backend) - + def checkAuth(self, user, password, remoteip=None): + if self.core.config["remote"]["nolocalauth"] and remoteip == "127.0.0.1": + return True + return self.core.db.checkAuth(user, password) |