[glom] More not hiding the database structure if the user does not have view rights.



commit afb5d4713b2b7b073b7a179a1ade355182da4a2a
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Feb 24 09:44:34 2012 +0100

    More not hiding the database structure if the user does not have view rights.
    
    	* glom/mode_data/box_data_list_related.cc: Do not check if the field really
    	exists, because that will fail if the user does not have view (SELECT) rights.

 ChangeLog                               |    7 +++++++
 glom/mode_data/box_data_list_related.cc |    5 +++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fa0bce8..9d3c515 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-24  Murray Cumming  <murrayc murrayc com>
+
+	More not hiding the database structure if the user does not have view rights.
+
+	* glom/mode_data/box_data_list_related.cc: Do not check if the field really	
+	exists, because that will fail if the user does not have view (SELECT) rights.
+
 2012-02-23  Murray Cumming  <murrayc murrayc com>
 
 	Do not hide the database structure if the user does not have view rights.
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 6038c9f..aff23dc 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -432,6 +432,10 @@ void Box_Data_List_Related::create_layout()
         child_item->set_editable(false);
 
       sharedptr<const LayoutItem_Field> child_field = sharedptr<const LayoutItem_Field>::cast_dynamic(child_item);
+      
+      //This check has already happened in Frame_Glom::update_table_in_document_from_database().
+      //It is inefficient and unnecessary to do it here too.
+      /*
       if(child_field)
       {
         //Check that the field really exists, to avoid SQL errors.
@@ -442,6 +446,7 @@ void Box_Data_List_Related::create_layout()
           continue;
         }
       }
+      */
 
       items_to_use.push_back(child_item);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]