bkruse: branch asterisknow r1428 - in /branches/asterisknow: ./ config/setup/
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Aug 22 16:54:06 CDT 2007
Author: bkruse
Date: Wed Aug 22 16:54:06 2007
New Revision: 1428
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1428
Log:
Merged revisions 1426 via svnmerge from
https://origsvn.digium.com/svn/asterisk-gui/branches/1.4
........
r1426 | bkruse | 2007-08-22 16:52:31 -0500 (Wed, 22 Aug 2007) | 8 lines
[1] Added the ability to check if a user does not have
proper permissions in manager.conf to read/write configs.
[2] If the user does not, alert them how to fix it, and
log them off of their session, so that when they do fix
manager.conf, it will allow them to log back in without
a restart of asterisk or browser or cache clear.
........
Modified:
branches/asterisknow/ (props changed)
branches/asterisknow/config/setup/install.html
Propchange: branches/asterisknow/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 22 16:54:06 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1416
+/branches/1.4:1-1296,1316,1326,1332,1336-1338,1342,1346,1356,1362,1381,1384,1395,1399,1402,1416,1426
Modified: branches/asterisknow/config/setup/install.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/setup/install.html?view=diff&rev=1428&r1=1427&r2=1428
==============================================================================
--- branches/asterisknow/config/setup/install.html (original)
+++ branches/asterisknow/config/setup/install.html Wed Aug 22 16:54:06 2007
@@ -37,6 +37,17 @@
var keepPinging;
var started_pinging = 0;
+/* Logoff and redirect user */
+function log_red() {
+ makerequest("","","action=logoff", function(t){ window.location.href="../cfgbasic.html"; } );
+}
+
+/* Make sure the user has proper permissions */
+function check_auth() {
+ makerequest("", "", "action=command&command=http%20show%20status", function(t) { t = t.split("\n"); if(t[1].search("Message: Permission Denied")) {
+ alert("Your Permissions are not setup Correctly\nPlease add the proper read/write permissions in manager.conf\nClick OK when the changes are made.\n\nExample User:\n\n[kruz]\nsecret = blah\npermit = 127.0.0.1/255.0.0.0\nread = system,call,log,verbose,command,agent,user,config\nwrite = system,call,log,verbose,command,agent,user,config"); log_red(); return false;} else { return true; }})
+
+}
function pingevery(a){
keepPinging = setInterval( makeping, a*250 );
}
@@ -50,6 +61,7 @@
asterisk_rawmanPath = "../" + asterisk_rawmanPath;
astmanEngine = new Astman();
astmanEngine.setURL(asterisk_rawmanPath);
+ if(!check_auth()) { return false; }
_$('mainscreen').src="1.html";
}
More information about the asterisk-gui-commits
mailing list