pari: branch pari/dahdi_support r4394 - in /team/pari/dahdi_support: ./ confi...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jan 6 09:23:46 CST 2009


Author: pari
Date: Tue Jan  6 09:23:45 2009
New Revision: 4394

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4394
Log:
Merged revisions 4077-4079,4081,4083,4085,4089-4090,4101,4104,4106,4111-4113,4115-4121,4123,4129-4130,4132,4134-4137,4148-4149,4151,4153,4155,4159-4160,4162,4164-4187,4195,4197-4201,4205,4211-4212,4215-4217,4219,4221-4224,4229-4230,4233-4240,4242,4244,4251-4252,4268,4270,4273,4276-4278,4281-4291,4293-4296,4301,4303-4305,4307-4308,4310,4313-4321,4334-4335,4337,4339-4344,4346-4350,4354-4358,4362,4365-4369,4373-4374,4377,4380,4382-4388,4390,4392-4393 via svnmerge from 
https://origsvn.digium.com/svn/asterisk-gui/branches/2.0

........
  r4393 | pari | 2009-01-06 09:17:48 -0600 (Tue, 06 Jan 2009) | 9 lines
  
  Critical bug fix
  GUI got stuck with 'Checking write permission for gui folder'
  
  problem: Missing 'originate' manager privilege for users upgrading from 1.4 to 1.6
  
  (closes issue #14171)
........

Modified:
    team/pari/dahdi_support/   (props changed)
    team/pari/dahdi_support/config/js/index.js

Propchange: team/pari/dahdi_support/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: team/pari/dahdi_support/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/team/pari/dahdi_support/config/js/index.js?view=diff&rev=4394&r1=4393&r2=4394
==============================================================================
--- team/pari/dahdi_support/config/js/index.js (original)
+++ team/pari/dahdi_support/config/js/index.js Tue Jan  6 09:23:45 2009
@@ -208,6 +208,23 @@
 		u.new_action('delcat', rand , '', '') ;
 		u.callActions();
 		ASTGUI.cookies.setCookie( 'rwaccess' , 'yes' );
+
+		if( sessionData.PLATFORM.isAST_1_6 ){
+			// make sure originate privilege is defined in asterisk 1.6
+			// This was introduced in Asterisk 1.6 and users upgrading from 1.4 do not have this
+			var tmp_managerUser = ASTGUI.cookies.getCookie('username') ;
+			var manager_conf = config2json({ filename:'manager.conf', usf:1 });
+			if( manager_conf[tmp_managerUser].hasOwnProperty('write') ){
+				var write_value = manager_conf[tmp_managerUser]['write'];
+				if( !write_value.contains('originate') ){
+					var u = new listOfSynActions('manager.conf');
+					u.new_action( 'update', tmp_managerUser, 'write', write_value + ',originate' , write_value );
+					u.callActions();
+					return 'manager_updated'; // about to reload
+				}
+			}
+		}
+
 		return true;
 	},
 
@@ -287,10 +304,14 @@
 				ASTGUI.dialog.alertmsg('The GUI does not have necessary privileges. <BR> Please check the manager permissions for the user !');
 				return;
 			}
-			if( crwp == 'postmappings_updated' ){
+			if( crwp == 'postmappings_updated' || crwp == 'manager_updated' ){
 				parent.ASTGUI.dialog.waitWhile(' reloading asterisk ... ');
 				var t = ASTGUI.cliCommand('reload') ;
 				setTimeout( function(){ 
+					if( sessionData.PLATFORM.isAST_1_6 ){
+						alert('                          Config files updated. '
+							+ '\n' + ' Please stop Asterisk and Start over for the changes to take effect' );
+					}
 					if( sessionData.DEBUG_MODE ){
 						alert('postmappings updated in http.conf' + '\n' + 'Click OK to reload');
 					}




More information about the asterisk-gui-commits mailing list