[Erp5-report] r34247 luke - /erp5/trunk/products/ERP5/ERP5Site.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 1 15:38:52 CEST 2010
Author: luke
Date: Thu Apr 1 15:38:48 2010
New Revision: 34247
URL: http://svn.erp5.org?rev=34247&view=rev
Log:
- add methods to setting/getting global site id
Modified:
erp5/trunk/products/ERP5/ERP5Site.py
Modified: erp5/trunk/products/ERP5/ERP5Site.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/ERP5Site.py?rev=34247&r1=34246&r2=34247&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/ERP5Site.py [utf8] (original)
+++ erp5/trunk/products/ERP5/ERP5Site.py [utf8] Thu Apr 1 15:38:48 2010
@@ -1268,6 +1268,21 @@
key = ('default_activate_parameter', )
return tv.get(key)
+ security.declareProtected(Permissions.ManagePortal, 'getERP5SiteGlobalId')
+ def getERP5SiteGlobalId(self):
+ """Returns site global ID without any fallback"""
+ return getattr(self, 'erp5_site_global_id', None)
+
+ security.declareProtected(Permissions.ManagePortal, 'setERP5SiteGlobalId')
+ def setERP5SiteGlobalId(self, global_id):
+ """Sets site global ID, only in case if not set yet
+
+ Such id should be very big and random, for example uuid version 4, as
+ defined in RFC 4122.
+ """
+ if self.getERP5SiteGlobalId() in [None, '']:
+ self.erp5_site_global_id = global_id
+
Globals.InitializeClass(ERP5Site)
def getBootstrapDirectory():
More information about the Erp5-report
mailing list