[Mpuls-commits] r5320 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 13 12:01:02 CEST 2011


Author: bh
Date: 2011-09-13 12:01:01 +0200 (Tue, 13 Sep 2011)
New Revision: 5320

Modified:
   base/trunk/mpulsweb/model/agencysettings.py
Log:
Add methods to access the agency settings for the meta server connection.


Modified: base/trunk/mpulsweb/model/agencysettings.py
===================================================================
--- base/trunk/mpulsweb/model/agencysettings.py	2011-09-13 09:39:43 UTC (rev 5319)
+++ base/trunk/mpulsweb/model/agencysettings.py	2011-09-13 10:01:01 UTC (rev 5320)
@@ -118,6 +118,18 @@
             return form
         return render('/privacy/default/privacy_statement.html')
 
+    def getMetaUserName(self):
+        return self.conf.get('meta_user_name', u'')
+
+    def getMetaUserPassword(self):
+        return self.conf.get('meta_user_password', u'')
+
+    def is_metauser_configured(self):
+        """Return whether the meta user is configured.
+        The return value is a boolean.
+        """
+        return self.getMetaUserPassword() and self.getMetaUserName()
+
     def get_value(self, name, default=None):
         return self.conf.get(name, default)
 



More information about the Mpuls-commits mailing list