From 7c332ae610f7feca193ba50ea900f5a417681a7b Mon Sep 17 00:00:00 2001 From: mkaay Date: Sat, 5 Feb 2011 14:19:22 +0100 Subject: created unified authentication system (same data for webinterface an GUI/CLI, multiple accounts) --- module/remote/RemoteManager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'module/remote/RemoteManager.py') 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) -- cgit v1.2.3