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

View File

@ -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);

View File

@ -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;