diff --git a/CASA.changes b/CASA.changes index 0686c2cd..de8aa58a 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 20 10:40:38 MST 2005 - jnorman@novell.com + +- Bug 140057. Disable destroying secrets when locked + ------------------------------------------------------------------- Tue Dec 20 10:23:38 MST 2005 - jnorman@novell.com diff --git a/c_gui/CasaTray.cs b/c_gui/CasaTray.cs index c4cd0240..0ef81293 100644 --- a/c_gui/CasaTray.cs +++ b/c_gui/CasaTray.cs @@ -139,14 +139,7 @@ namespace Novell.CASA.GUI menuUnLockMiCasa.Image = appimg; // sets the menu item's image menuUnLockMiCasa.Activated +=new EventHandler(menuLockMiCasa_Activated); - if (MiCASAStore.IsLocked()) - { - menuLockMiCasa.Sensitive = false; - } - else - { - menuUnLockMiCasa.Sensitive = false; - } + popupMenu.Add(menuLockMiCasa); popupMenu.Add(menuUnLockMiCasa); @@ -159,6 +152,17 @@ namespace Novell.CASA.GUI menuDestroyMiCasa.Activated +=new EventHandler(menuDestroyMiCasa_Activated); popupMenu.Add(menuDestroyMiCasa); + if (MiCASAStore.IsLocked()) + { + menuLockMiCasa.Sensitive = false; + menuDestroyMiCasa.Sensitive = false; + } + else + { + menuUnLockMiCasa.Sensitive = false; + menuDestroyMiCasa.Sensitive = true; + } + ImageMenuItem menuOptionsMiCasa = new ImageMenuItem ("Options ...."); menuOptionsMiCasa.Sensitive = false; popupMenu.Add(menuOptionsMiCasa); diff --git a/c_micasad/verbs/ObjectSerialization.cs b/c_micasad/verbs/ObjectSerialization.cs index dc242588..d2bfa1e4 100644 --- a/c_micasad/verbs/ObjectSerialization.cs +++ b/c_micasad/verbs/ObjectSerialization.cs @@ -207,12 +207,20 @@ namespace sscs.verbs private WrappedObject DoRemoveAllSecrets(SecretStore ssStore, WrappedObject wo) { - string sKeyChainID = wo.GetKeychainID(); - if (sKeyChainID != null) + + if (!ssStore.IsStoreLocked()) { - KeyChain kc = ssStore.GetKeyChain(sKeyChainID); - kc.RemoveAllSecrets(); - ssStore.UpdatePersistentStore(); + string sKeyChainID = wo.GetKeychainID(); + if (sKeyChainID != null) + { + KeyChain kc = ssStore.GetKeyChain(sKeyChainID); + kc.RemoveAllSecrets(); + ssStore.UpdatePersistentStore(); + } + } + else + { + wo.SetError(constants.RetCodes.FAILURE, "Store locked"); } return wo;