Alpha code for Secret Persistence Policy. In Progress.
This commit is contained in:
parent
85c67638a1
commit
b7c2fc8b7c
@ -240,11 +240,6 @@
|
|||||||
SubType = "Code"
|
SubType = "Code"
|
||||||
BuildAction = "Compile"
|
BuildAction = "Compile"
|
||||||
/>
|
/>
|
||||||
<File
|
|
||||||
RelPath = "PolicyDialog.cs"
|
|
||||||
SubType = "Code"
|
|
||||||
BuildAction = "Compile"
|
|
||||||
/>
|
|
||||||
<File
|
<File
|
||||||
RelPath = "SingleApplication.cs"
|
RelPath = "SingleApplication.cs"
|
||||||
SubType = "Code"
|
SubType = "Code"
|
||||||
|
@ -1648,9 +1648,11 @@ namespace Novell.CASA.GUI
|
|||||||
radiobutton1.Sensitive = checkbuttonRunInTray.Active;
|
radiobutton1.Sensitive = checkbuttonRunInTray.Active;
|
||||||
radiobutton2.Sensitive = checkbuttonRunInTray.Active;
|
radiobutton2.Sensitive = checkbuttonRunInTray.Active;
|
||||||
|
|
||||||
radiobutton1.Active = config.GetConfigSetting(Common.DISPLAY_CASA_MANAGER, true);
|
radiobutton1.Active = config.GetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, true);
|
||||||
radiobutton2.Active = !config.GetConfigSetting(Common.DISPLAY_CASA_MANAGER, true);
|
radiobutton2.Active = !config.GetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, true);
|
||||||
|
|
||||||
|
checkbuttonDecrypt.Active = config.GetConfigSetting(Common.CONFIG_DECRYPT_USING_DESKTOP_PASS, true);
|
||||||
|
checkbuttonSaveSecrets.Active = config.GetConfigSetting(Common.CONFIG_PERSIST_SECRETS, true);
|
||||||
|
|
||||||
if (Common.IS_WINDOWS)
|
if (Common.IS_WINDOWS)
|
||||||
{
|
{
|
||||||
@ -1703,9 +1705,9 @@ namespace Novell.CASA.GUI
|
|||||||
public void on_radiobutton1_clicked(object obj, EventArgs e)
|
public void on_radiobutton1_clicked(object obj, EventArgs e)
|
||||||
{
|
{
|
||||||
if (radiobutton1.Active)
|
if (radiobutton1.Active)
|
||||||
config.SetConfigSetting(Common.DISPLAY_CASA_MANAGER, true);
|
config.SetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, true);
|
||||||
else
|
else
|
||||||
config.SetConfigSetting(Common.DISPLAY_CASA_MANAGER, false);
|
config.SetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, false);
|
||||||
|
|
||||||
config.WriteConfig();
|
config.WriteConfig();
|
||||||
}
|
}
|
||||||
@ -1803,7 +1805,18 @@ namespace Novell.CASA.GUI
|
|||||||
}
|
}
|
||||||
StorePolicyInterface.SaveAggregationPolicy();
|
StorePolicyInterface.SaveAggregationPolicy();
|
||||||
|
|
||||||
// update perisentent location
|
|
||||||
|
// update persistent policy settings
|
||||||
|
config.SetConfigSetting(Common.CONFIG_PERSIST_SECRETS, checkbuttonSaveSecrets.Active);
|
||||||
|
config.SetConfigSetting(Common.CONFIG_DECRYPT_USING_DESKTOP_PASS, checkbuttonDecrypt.Active);
|
||||||
|
|
||||||
|
// delete .miCASA file if not peristing
|
||||||
|
if (!checkbuttonSaveSecrets.Active)
|
||||||
|
{
|
||||||
|
File.Delete(Common.GetUserPersistentDir(config) + Common.MICASA_PERSISTENCE_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// update persistent location
|
||||||
// move .miCASA files
|
// move .miCASA files
|
||||||
string sNewDir = entryStorageDirectory.Text;
|
string sNewDir = entryStorageDirectory.Text;
|
||||||
string sOldDir = Common.GetUserPersistentDir(config);
|
string sOldDir = Common.GetUserPersistentDir(config);
|
||||||
@ -1821,6 +1834,7 @@ namespace Novell.CASA.GUI
|
|||||||
CommonGUI.DisplayMessage(Gtk.MessageType.Warning, "Error occurred while moving files.\r\n" + e.ToString());
|
CommonGUI.DisplayMessage(Gtk.MessageType.Warning, "Error occurred while moving files.\r\n" + e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.WriteConfig();
|
||||||
Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - END");
|
Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - END");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2213,10 +2227,6 @@ namespace Novell.CASA.GUI
|
|||||||
|
|
||||||
public void on_policies_activate(object obj, EventArgs args)
|
public void on_policies_activate(object obj, EventArgs args)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("policy Activate");
|
|
||||||
//PolicyDialog pd = new PolicyDialog();
|
|
||||||
//pd.ShowDialog();
|
|
||||||
|
|
||||||
PersistentPolicyDialog ppd = new PersistentPolicyDialog();
|
PersistentPolicyDialog ppd = new PersistentPolicyDialog();
|
||||||
ppd.ShowDialog();
|
ppd.ShowDialog();
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ namespace Novell.CASA.GUI
|
|||||||
private void notifyIcon_DoubleClick(object sender, EventArgs e)
|
private void notifyIcon_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//menuLockMiCasa_Activated(sender, e);
|
//menuLockMiCasa_Activated(sender, e);
|
||||||
if (m_config.GetConfigSetting(Common.DISPLAY_CASA_MANAGER, true))
|
if (m_config.GetConfigSetting(Common.CONFIG_DISPLAY_CASA_MANAGER, true))
|
||||||
menuLaunchGUI_Activated(sender, e);
|
menuLaunchGUI_Activated(sender, e);
|
||||||
else
|
else
|
||||||
menuLockMiCasa_Activated(sender, e);
|
menuLockMiCasa_Activated(sender, e);
|
||||||
|
@ -139,9 +139,12 @@ public class Common
|
|||||||
public static string ARG_DEBUG = "-debug";
|
public static string ARG_DEBUG = "-debug";
|
||||||
|
|
||||||
// config settings
|
// config settings
|
||||||
public static string CONFIG_RUN_IN_TRAY = "RunInTray";
|
// NOTE: some of these are used in micasad
|
||||||
public static string DISPLAY_CASA_MANAGER = "DisplayCasaManagerOnClick";
|
public static string CONFIG_RUN_IN_TRAY = "RunInTray";
|
||||||
public static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
|
public static string CONFIG_DISPLAY_CASA_MANAGER = "DisplayCasaManagerOnClick";
|
||||||
|
public static string CONFIG_PERSISTENT_DIRECTORY = "PersistentDirectory";
|
||||||
|
public static string CONFIG_PERSIST_SECRETS = "PersistSecrets";
|
||||||
|
public static string CONFIG_DECRYPT_USING_DESKTOP_PASS = "DecryptUsingDesktopPassword";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user