[gnome-online-accounts/wip/kerberos] Change IsPermanent to IsTemporary



commit 2a03960af7633606c0c8c4ed43464aa0c7d56cde
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Aug 20 18:15:07 2012 +0200

    Change IsPermanent to IsTemporary
    
    Since FALSE is the default value of the properties, and we want
    accounts to be permanent by default, IsTemporary is a better fit than
    IsPermanent.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679253

 data/dbus-interfaces.xml             |   16 +++++++++-------
 src/daemon/goadaemon.c               |   16 ++++++++--------
 src/goabackend/goakerberosprovider.c |    1 +
 src/goaidentity/goaidentityservice.c |    2 +-
 4 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
index c58aed0..d1800c5 100644
--- a/data/dbus-interfaces.xml
+++ b/data/dbus-interfaces.xml
@@ -69,19 +69,21 @@
       -->
     <property name="Id" type="s" access="read"/>
 
-    <!-- IsPermanent:
+    <!-- IsTemporary:
 
          Whether or not the account is remembered from session to session.
 
-         Non-permanent accounts are added implicitly when the user is granted credentials
-         from some mechanism other than Online Accounts, but that Online Accounts
-         still knows how to deal with.
+         Temporary accounts are added implicitly when the user is granted
+         credentials from some mechanism other than Online Accounts, but that
+         Online Accounts still knows how to deal with.
 
-         They are specific to the machine/session and are silently disregarded after logout.
+         They are specific to the machine/session and are silently disregarded
+         after logout.
 
-         Accounts are permanant by default unless created with "IsPermanent" "false" detail.
+         Accounts are permanant by default unless created with "IsTemporary"
+         "true" detail.
       -->
-    <property name="IsPermanent" type="b" access="read"/>
+    <property name="IsTemporary" type="b" access="read"/>
 
     <!-- AttentionNeeded: Set to %TRUE if the account is in need of attention.
 
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 7cb72e0..5c6c18b 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -386,22 +386,22 @@ add_config_file (GoaDaemon     *daemon,
         {
           if (g_str_has_prefix (groups[n], "Account "))
             {
-              gboolean is_permanent;
+              gboolean is_temporary;
               char *session_id;
 
-              is_permanent = g_key_file_get_boolean (key_file,
+              is_temporary = g_key_file_get_boolean (key_file,
                                                      groups[n],
-                                                     "IsPermanent",
+                                                     "IsTemporary",
                                                      NULL);
 
-              if (!is_permanent)
+              if (is_temporary)
                 {
                   session_id = g_key_file_get_string (key_file,
                                                       groups[n],
                                                       "SessionId",
                                                       NULL);
 
-                  /* discard non-permanent accounts from older sessions */
+                  /* discard temporary accounts from older sessions */
                   if (session_id != NULL &&
                       g_strcmp0 (session_id, guid) != 0)
                     {
@@ -848,13 +848,13 @@ on_manager_handle_add_account (GoaManager             *manager,
   g_variant_iter_init (&iter, details);
   while (g_variant_iter_next (&iter, "{&s&s}", &key, &value))
     {
-      /* We treat IsPermanent special.  If it's false we add in
+      /* We treat IsTemporary special.  If it's true we add in
        * the current session guid, so it can be ignored after
        * the session is over.
        */
-      if (g_strcmp0 (key, "IsPermanent") == 0)
+      if (g_strcmp0 (key, "IsTemporary") == 0)
         {
-          if (g_strcmp0 (value, "false") == 0)
+          if (g_strcmp0 (value, "true") == 0)
             {
               const char *guid;
 
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 9d2be6c..b0e92ad 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1338,6 +1338,7 @@ start_over:
 
   g_variant_builder_init (&details, G_VARIANT_TYPE ("a{ss}"));
   g_variant_builder_add (&details, "{ss}", "Realm", realm);
+  g_variant_builder_add (&details, "{ss}", "IsTemporary", "true");
   g_variant_builder_add (&details, "{ss}", "TicketingEnabled", "true");
 
   g_free (principal_for_display);
diff --git a/src/goaidentity/goaidentityservice.c b/src/goaidentity/goaidentityservice.c
index 397bfc0..0bedeac 100644
--- a/src/goaidentity/goaidentityservice.c
+++ b/src/goaidentity/goaidentityservice.c
@@ -1674,7 +1674,7 @@ add_temporary_account (GoaIdentityService *self,
 
   g_variant_builder_init (&details, G_VARIANT_TYPE ("a{ss}"));
   g_variant_builder_add (&details, "{ss}", "Realm", realm);
-  g_variant_builder_add (&details, "{ss}", "IsPermanent", "false");
+  g_variant_builder_add (&details, "{ss}", "IsTemporary", "true");
   g_variant_builder_add (&details, "{ss}", "TicketingEnabled", "true");
 
 



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