[gnome-initial-setup/shell/4765: 255/362] Disable automatic login option



commit 80b7f661b56bf4c140682f7f700fe252684dba56
Author: Roddy Shuler <roddy endlessm com>
Date:   Mon Oct 6 08:50:00 2014 -0700

    Disable automatic login option
    
    As long as the user needs a password for tasks like configuring WiFi /
    adding a printer / installing apps, we should not allow the user
    to select automatic login during FBE, as that will encourage users
    to forget passwords.  Besides, during FBE, no one is likely to even
    know what "automatic login" means -- better to start with a password
    (and shared user) and let the user discover how to automatically login
    if that is really what he/she wants.
    
    [endlessm/eos-shell#3900]

 .../pages/account/gis-account-page.c               |   11 +----------
 .../pages/account/gis-account-page.ui              |   16 +---------------
 2 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c 
b/gnome-initial-setup/pages/account/gis-account-page.c
index 7a7b380..8e0a8f1 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -471,7 +471,6 @@ local_create_user (GisAccountPage *page)
   const gchar *fullname;
   const gchar *language;
   ActUser *old_user;
-  gboolean autologin_active;
   GSettings *lock_settings;
   GError *error = NULL;
 
@@ -480,8 +479,6 @@ local_create_user (GisAccountPage *page)
   username = gtk_combo_box_text_get_active_text (OBJ(GtkComboBoxText*, "account-username-combo"));
   fullname = gtk_entry_get_text (OBJ (GtkEntry*, "account-fullname-entry"));
   password = gtk_entry_get_text (OBJ (GtkEntry*, "account-password-entry"));
-  autologin_active = gtk_toggle_button_get_active (OBJ (GtkToggleButton*,
-                                                   "account-autologin-button"));
 
   priv->act_user = act_user_manager_create_user (priv->act_client, username, fullname, priv->account_type, 
&error);
   if (error != NULL) {
@@ -507,18 +504,12 @@ local_create_user (GisAccountPage *page)
   if (language)
     act_user_set_language (priv->act_user, language);
 
-  act_user_set_automatic_login (priv->act_user, autologin_active);
+  act_user_set_automatic_login (priv->act_user, FALSE);
   gis_driver_set_user_permissions (GIS_PAGE (page)->driver,
                                    priv->act_user,
                                    password);
 
   gis_update_login_keyring_password (old_password, password);
-
-  if (autologin_active) {
-    lock_settings = g_settings_new ("org.gnome.desktop.screensaver");
-    g_settings_set_boolean (lock_settings, "lock-enabled", FALSE);
-    g_object_unref (lock_settings);
-  }
 }
 
 static void
diff --git a/gnome-initial-setup/pages/account/gis-account-page.ui 
b/gnome-initial-setup/pages/account/gis-account-page.ui
index 0c8c55f..589a98d 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page.ui
@@ -309,20 +309,6 @@
               </packing>
             </child>
             <child>
-              <object class="GtkCheckButton" id="account-autologin-button">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="label" translatable="yes">A_utomatic Login</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">9</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkLabel" id="local-continue">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
@@ -340,7 +326,7 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">10</property>
+                <property name="top_attach">9</property>
                 <property name="width">2</property>
                 <property name="height">1</property>
               </packing>


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