This commit is contained in:
Jim Norman 2005-12-20 17:41:46 +00:00
parent 8439dee118
commit b1283d3b62
3 changed files with 30 additions and 13 deletions

View File

@ -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 Tue Dec 20 10:23:38 MST 2005 - jnorman@novell.com

View File

@ -139,14 +139,7 @@ namespace Novell.CASA.GUI
menuUnLockMiCasa.Image = appimg; // sets the menu item's image menuUnLockMiCasa.Image = appimg; // sets the menu item's image
menuUnLockMiCasa.Activated +=new EventHandler(menuLockMiCasa_Activated); menuUnLockMiCasa.Activated +=new EventHandler(menuLockMiCasa_Activated);
if (MiCASAStore.IsLocked())
{
menuLockMiCasa.Sensitive = false;
}
else
{
menuUnLockMiCasa.Sensitive = false;
}
popupMenu.Add(menuLockMiCasa); popupMenu.Add(menuLockMiCasa);
popupMenu.Add(menuUnLockMiCasa); popupMenu.Add(menuUnLockMiCasa);
@ -159,6 +152,17 @@ namespace Novell.CASA.GUI
menuDestroyMiCasa.Activated +=new EventHandler(menuDestroyMiCasa_Activated); menuDestroyMiCasa.Activated +=new EventHandler(menuDestroyMiCasa_Activated);
popupMenu.Add(menuDestroyMiCasa); popupMenu.Add(menuDestroyMiCasa);
if (MiCASAStore.IsLocked())
{
menuLockMiCasa.Sensitive = false;
menuDestroyMiCasa.Sensitive = false;
}
else
{
menuUnLockMiCasa.Sensitive = false;
menuDestroyMiCasa.Sensitive = true;
}
ImageMenuItem menuOptionsMiCasa = new ImageMenuItem ("Options ...."); ImageMenuItem menuOptionsMiCasa = new ImageMenuItem ("Options ....");
menuOptionsMiCasa.Sensitive = false; menuOptionsMiCasa.Sensitive = false;
popupMenu.Add(menuOptionsMiCasa); popupMenu.Add(menuOptionsMiCasa);

View File

@ -206,6 +206,9 @@ namespace sscs.verbs
private WrappedObject DoRemoveAllSecrets(SecretStore ssStore, WrappedObject wo) private WrappedObject DoRemoveAllSecrets(SecretStore ssStore, WrappedObject wo)
{
if (!ssStore.IsStoreLocked())
{ {
string sKeyChainID = wo.GetKeychainID(); string sKeyChainID = wo.GetKeychainID();
if (sKeyChainID != null) if (sKeyChainID != null)
@ -214,6 +217,11 @@ namespace sscs.verbs
kc.RemoveAllSecrets(); kc.RemoveAllSecrets();
ssStore.UpdatePersistentStore(); ssStore.UpdatePersistentStore();
} }
}
else
{
wo.SetError(constants.RetCodes.FAILURE, "Store locked");
}
return wo; return wo;
} }