[glom] Really prevent changing to developer mode for non-developers.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Really prevent changing to developer mode for non-developers.
- Date: Thu, 2 Feb 2012 08:44:07 +0000 (UTC)
commit c49a220b271413bf13823d01a52551a932a13a68
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Feb 2 09:40:37 2012 +0100
Really prevent changing to developer mode for non-developers.
* glom/frame_glom.cc: on_menu_developer_developer(): Actually use the
result of Privs::get_user_is_in_group().
* tests/test_selfhosting_new_from_example_operator.cc: Test this
same function here, though this test currently fails anyway.
Really prevent changing to developer mode for non-developers.
This fixes bug #669043 (alien)
ChangeLog | 10 ++++++++++
glom/frame_glom.cc | 4 +++-
.../test_selfhosting_new_from_example_operator.cc | 7 +++++++
3 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0908c7e..9cd1488 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-02-02 Murray Cumming <murrayc murrayc com>
+
+ Really prevent changing to developer mode for non-developers.
+
+ * glom/frame_glom.cc: on_menu_developer_developer(): Actually use the
+ result of Privs::get_user_is_in_group().
+ * tests/test_selfhosting_new_from_example_operator.cc: Test this
+ same function here, though this test currently fails anyway.
+ This fixes bug #669043 (alien)
+
2012-02-01 Murray Cumming <murrayc murrayc com>
Allow user and group names to have spaces and other special characters.
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 1524d65..af1ce3b 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -464,7 +464,9 @@ void Frame_Glom::on_menu_developer_developer(const Glib::RefPtr<Gtk::RadioAction
bool test = true;
if(sharedconnection && sharedconnection->get_gda_connection()->supports_feature(Gnome::Gda::CONNECTION_FEATURE_USERS))
- Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER);
+ {
+ test = Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER);
+ }
if(test)
{
diff --git a/tests/test_selfhosting_new_from_example_operator.cc b/tests/test_selfhosting_new_from_example_operator.cc
index a0e95e8..bebcb91 100644
--- a/tests/test_selfhosting_new_from_example_operator.cc
+++ b/tests/test_selfhosting_new_from_example_operator.cc
@@ -117,6 +117,13 @@ static bool test(Glom::Document::HostingMode hosting_mode)
return false;
}
+ if(Glom::Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER))
+ {
+ std::cerr << "The operator user is in the developer group, but should not be." << std::endl;
+ return false;
+ }
+
+
test_selfhosting_cleanup(); //Delete the file this time.
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]