[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc ESC.js, 1.7, 1.8

Jack Magne (jmagne) fedora-directory-commits at redhat.com
Wed Feb 28 19:08:45 UTC 2007


Author: jmagne

Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9414

Modified Files:
	ESC.js 
Log Message:
Simple fixes for Security Officer Mode.



Index: ESC.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/ESC.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ESC.js	24 Feb 2007 02:07:49 -0000	1.7
+++ ESC.js	28 Feb 2007 19:08:43 -0000	1.8
@@ -288,9 +288,13 @@
       homeRes =  phoneHome(home,keyID,callback);
   }
 
-  if(!home)
+  // Launch the config dialog only if we can't
+  // Phone Home and we are not in the special security mode
+
+  if(!homeRes && !CheckForSecurityMode())
   {
       recordMessage("About to launch CONFIG , non secmode...");
+
       launchCONFIG(keyType,keyID);
   }
 
@@ -2705,7 +2709,8 @@
 
   UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed);
 
-  MyAlert(getBundleString("enrollmentFor") + " "  + getBundleString("smartCard") + " " + getBundleString("wasSuccessful"));
+  if(!CheckForSecurityMode())
+      MyAlert(getBundleString("enrollmentFor") + " "  + getBundleString("smartCard") + " " + getBundleString("wasSuccessful"));
 
 
   if(gEnrollmentPage)
@@ -2732,7 +2737,8 @@
 
   UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed);
 
-  MyAlert(getBundleString("pinResetSuccessful"));
+  if(!CheckForSecurityMode())
+      MyAlert(getBundleString("pinResetSuccessful"));
   ClearProgressBar(KeyToProgressBarID(keyType, keyID));
 
   if(gAdminPage)
@@ -2754,7 +2760,8 @@
 
   UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed);
 
-  MyAlert(getBundleString("formatOf") + " " + getBundleString("smartCard") + " "  + getBundleString("wasSuccessful"));
+  if(!CheckForSecurityMode())
+      MyAlert(getBundleString("formatOf") + " " + getBundleString("smartCard") + " "  + getBundleString("wasSuccessful"));
   ClearProgressBar(KeyToProgressBarID(keyType, keyID));
 
    if(gAdminPage)
@@ -2809,7 +2816,8 @@
      UpdateAdminListRow(keyType,keyID);
    }
 
-  MyAlert(typeStr);
+  if(!CheckForSecurityMode())
+      MyAlert(typeStr);
   ClearProgressBar(KeyToProgressBarID(keyType, keyID));
 }
 
@@ -3357,6 +3365,18 @@
 
 }
 
+function ShowUsage()
+{
+    var usageStr = getBundleString("escUsage1")  + "\n";
+    usageStr += getBundleString("escUsage2") + "\n";
+    usageStr += getBundleString("escUsage3") + "\n";
+    usageStr += getBundleString("escUsage4") + "\n";
+    usageStr += getBundleString("escUsage5"); 
+
+    MyAlert(usageStr);
+}
+
+
 //Is the security mode up?
 function CheckForSecurityMode()
 {
@@ -3435,31 +3455,12 @@
 
 }
 
+
 //Launch security mode window
 
 function launchESCSecMode(aUrl)
 {
     recordMessage("In launchESCSecMode");
-    var noEnrolledKeys = true;
-    var arr = GetAvailableCoolKeys();
-    if (arr && arr.length > 0)
-    {
-       var i;
-       for (i=0; i < 1; i++)
-       {
-          if(GetCoolKeyIsEnrolled(arr[i][0],arr[i][1]))
-          {
-               noEnrolledKeys = false;
-               break;
-          }
-       }
-    } 
-
-    if(noEnrolledKeys)
-    {
-        MyAlert(getBundleString("errorNeedKeyForSecMode"));
-        return;
-    }
 
     DoCoolKeySetConfigValue(ESC_SECURITY_URL,aUrl);
 
@@ -3468,8 +3469,6 @@
     {
         recordMessage("About to launch security window.");
         var wind = window.open("chrome://esc/content/security.xul","","chrome,resizable,centerscreen,dialog");
-
-         wind.ShowWindow();
          wind.focus();
     }
     else




More information about the Fedora-directory-commits mailing list