includes/clientside/static/ajax.js
changeset 907 44851d7e9bda
parent 906 c949e82b8f49
child 946 ff58e1732482
--- a/includes/clientside/static/ajax.js	Mon Apr 13 14:43:28 2009 -0400
+++ b/includes/clientside/static/ajax.js	Mon Apr 13 16:57:20 2009 -0400
@@ -42,6 +42,18 @@
   // touch this variable to allow it to be used in child functions
   void(existing_level);
   
+  // require re-auth
+  if ( auth_level <= USER_LEVEL_MEMBER )
+  {
+    load_component(['login', 'fadefilter', 'flyin', 'jquery', 'jquery-ui', 'crypto', 'messagebox']);
+    ajaxDynamicReauth(function(key)
+      {
+        ajaxProtect(existing_level);
+      }, user_level);
+    
+    return false;
+  }
+  
   load_component(['messagebox', 'jquery', 'jquery-ui', 'l10n', 'fadefilter', 'flyin']);
   
   // preload language
@@ -312,6 +324,19 @@
   // IE <6 pseudo-compatibility
   if ( KILL_SWITCH )
     return true;
+  
+  // require re-auth
+  if ( auth_level <= USER_LEVEL_MEMBER )
+  {
+    load_component(['login', 'fadefilter', 'flyin', 'jquery', 'jquery-ui', 'crypto', 'messagebox']);
+    ajaxDynamicReauth(function(key)
+      {
+        ajaxDeletePage();
+      }, user_level);
+    
+    return false;
+  }
+  
   load_component(['l10n', 'messagebox', 'jquery', 'jquery-ui', 'fadefilter', 'flyin']);
   
   // stage 1: prompt for reason and confirmation
@@ -705,6 +730,18 @@
   if ( KILL_SWITCH )
     return true;
   
+  // require re-auth
+  if ( auth_level <= USER_LEVEL_MEMBER )
+  {
+    load_component(['login', 'fadefilter', 'flyin', 'jquery', 'jquery-ui', 'crypto', 'messagebox']);
+    ajaxDynamicReauth(function(key)
+      {
+        ajaxClearLogs();
+      }, user_level);
+    
+    return false;
+  }
+  
   load_component(['l10n', 'messagebox', 'flyin', 'fadefilter']);
   
   miniPromptMessage({