[glom/glom-1-20] DbUtils::recreate_database_from_document(): Set table privileges too.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-20] DbUtils::recreate_database_from_document(): Set table privileges too.
- Date: Mon, 5 Dec 2011 15:20:38 +0000 (UTC)
commit ea40dfcf6840bc6648dddc29f70eecb371fc0b45
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 2 16:44:31 2011 +0100
DbUtils::recreate_database_from_document(): Set table privileges too.
* glom/libglom/db_utils.cc: recreate_database_from_document():
Also call set_table_privileges_groups_from_document().
ChangeLog | 7 +++++++
glom/libglom/db_utils.cc | 8 ++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9bbea74..1b84669 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-12-02 Murray Cumming <murrayc murrayc com>
+ DbUtils::recreate_database_from_document(): Set table privileges too.
+
+ * glom/libglom/db_utils.cc: recreate_database_from_document():
+ Also call set_table_privileges_groups_from_document().
+
+2011-12-02 Murray Cumming <murrayc murrayc com>
+
DbUtils::recreate_database_from_document(): Create groups too.
* glom/libglom/db_utils.[h|cc]: recreate_database_from_document():
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index c2d1fed..6101d25 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -287,6 +287,14 @@ bool recreate_database_from_document(Document* document, const sigc::slot<void>&
std::cerr << G_STRFUNC << ": add_groups_from_document() failed." << std::endl;
return false;
}
+
+ //Set table privileges, using the groups we just added:
+ progress();
+ if(!DbUtils::set_table_privileges_groups_from_document(document))
+ {
+ std::cerr << G_STRFUNC << ": set_table_privileges_groups_from_document() failed." << std::endl;
+ return false;
+ }
for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]