[IMP] new method that ollow the server to return a message that will be display on...
authorChristophe Simonis <christophe@tinyerp.com>
Mon, 3 Aug 2009 10:08:43 +0000 (12:08 +0200)
committerChristophe Simonis <christophe@tinyerp.com>
Mon, 3 Aug 2009 10:08:43 +0000 (12:08 +0200)
bzr revid: christophe@tinyerp.com-20090803100843-6oepu5zi8tycifvu

bin/service/web_services.py
bin/tools/config.py

index d472156..46a6659 100644 (file)
@@ -374,6 +374,7 @@ class common(netsvc.Service):
         self.exportMethod(self.get_available_updates)
         self.exportMethod(self.get_migration_scripts)
         self.exportMethod(self.get_server_environment)
+        self.exportMethod(self.login_message)
 
     def ir_set(self, db, uid, password, keys, args, name, value, replace=True, isobject=False):
         security.check(db, uid, password)
@@ -555,6 +556,11 @@ GNU Public Licence.
                     %(platform.release(), platform.version(), platform.architecture()[0],
                       os_lang, platform.python_version(),release.version,rev_id)
         return environment
+    
+
+    def login_message(self):
+        return tools.config.get('login_message', False)
+
 common()
 
 class objects_proxy(netsvc.Service):
index efd7aa7..d4d9327 100644 (file)
@@ -78,6 +78,7 @@ class configmanager(object):
             'log_level': logging.INFO,
             'assert_exit_level': logging.WARNING, # level above which a failed assert will be raise
             'cache_timeout': 100000,
+            'login_message': False,
         }
 
         hasSSL = check_ssl()