Author: jure
Date: Fri Feb 15 13:19:57 2013
New Revision: 1446568
URL: http://svn.apache.org/r1446568
Log:
#288, populate global permission table on database upgrade
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py?rev=1446568&r1=1446567&r2=1446568&view=diff
==============================================================================
---
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
(original)
+++
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
Fri Feb 15 13:19:57 2013
@@ -185,6 +185,10 @@ class MultiProductSystem(Component):
self.log.info("Populating table '%s' for product '%s'
('%s')", table, product.name, product.prefix)
db("INSERT INTO %s (%s, product) SELECT %s,'%s' FROM
%s_temp" %
(table, cols, cols, product.prefix, table))
+ if table == 'permission':
+ self.log.info("Populating table '%s' for global
scope", table)
+ db("INSERT INTO %s (%s, product) SELECT %s,'%s' FROM
%s_temp" %
+ (table, cols, cols, '', table))
db("DROP TABLE %s_temp" % table)
db_installed_version = self._update_db_version(db, 3)