Mantis#2340. Thank you kindly, Sacha Magne for a patch that:
adding default_loginLevel in USerServer.xml to set a default login level to acces to the grid. Fixing one bug in login_reset0.6.0-stable
							parent
							
								
									ec2970f6b4
								
							
						
					
					
						commit
						f2ec151328
					
				| 
						 | 
				
			
			@ -46,6 +46,7 @@ namespace OpenSim.Framework
 | 
			
		|||
        public string GridSendKey = String.Empty;
 | 
			
		||||
        public uint HttpPort = DefaultHttpPort;
 | 
			
		||||
        public bool HttpSSL = DefaultHttpSSL;
 | 
			
		||||
        public uint DefaultUserLevel = 0;
 | 
			
		||||
 | 
			
		||||
        private Uri m_inventoryUrl;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -123,6 +124,10 @@ namespace OpenSim.Framework
 | 
			
		|||
                                                "Known good region Y", "1000", false);
 | 
			
		||||
            configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
 | 
			
		||||
                    "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false);
 | 
			
		||||
            
 | 
			
		||||
            configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
 | 
			
		||||
                                                "Minimum Level a user should have to login [0 default]", "0", false);
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
 | 
			
		||||
| 
						 | 
				
			
			@ -165,6 +170,10 @@ namespace OpenSim.Framework
 | 
			
		|||
                case "enable_llsd_login":
 | 
			
		||||
                    EnableLLSDLogin = (bool)configuration_result;
 | 
			
		||||
                    break;
 | 
			
		||||
 | 
			
		||||
                case "default_loginLevel":
 | 
			
		||||
                    DefaultUserLevel = (uint)configuration_result;
 | 
			
		||||
                     break;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return true;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -124,6 +124,10 @@ namespace OpenSim.Grid.UserServer
 | 
			
		|||
            m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
 | 
			
		||||
 | 
			
		||||
            m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
 | 
			
		||||
            //
 | 
			
		||||
            // Get the minimum defaultLevel to access to the grid
 | 
			
		||||
            //
 | 
			
		||||
            m_loginService.setloginlevel((int)Cfg.DefaultUserLevel);
 | 
			
		||||
 | 
			
		||||
            if (Cfg.EnableLLSDLogin)
 | 
			
		||||
            {
 | 
			
		||||
| 
						 | 
				
			
			@ -294,10 +298,7 @@ namespace OpenSim.Grid.UserServer
 | 
			
		|||
                    }
 | 
			
		||||
                    break;
 | 
			
		||||
                case "login-reset":
 | 
			
		||||
                    if (cmdparams.Length == 1)
 | 
			
		||||
                    {
 | 
			
		||||
                     m_loginService.setloginlevel(0);
 | 
			
		||||
                    }
 | 
			
		||||
                    break;
 | 
			
		||||
                case "login-text":
 | 
			
		||||
                    if (cmdparams.Length == 1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue