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 string GridSendKey = String.Empty;
 | 
				
			||||||
        public uint HttpPort = DefaultHttpPort;
 | 
					        public uint HttpPort = DefaultHttpPort;
 | 
				
			||||||
        public bool HttpSSL = DefaultHttpSSL;
 | 
					        public bool HttpSSL = DefaultHttpSSL;
 | 
				
			||||||
 | 
					        public uint DefaultUserLevel = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private Uri m_inventoryUrl;
 | 
					        private Uri m_inventoryUrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -122,7 +123,11 @@ namespace OpenSim.Framework
 | 
				
			||||||
            configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
 | 
					            configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
 | 
				
			||||||
                                                "Known good region Y", "1000", false);
 | 
					                                                "Known good region Y", "1000", false);
 | 
				
			||||||
            configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
 | 
					            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);
 | 
					                    "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)
 | 
					        public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
 | 
				
			||||||
| 
						 | 
					@ -165,9 +170,13 @@ namespace OpenSim.Framework
 | 
				
			||||||
                case "enable_llsd_login":
 | 
					                case "enable_llsd_login":
 | 
				
			||||||
                    EnableLLSDLogin = (bool)configuration_result;
 | 
					                    EnableLLSDLogin = (bool)configuration_result;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                case "default_loginLevel":
 | 
				
			||||||
 | 
					                    DefaultUserLevel = (uint)configuration_result;
 | 
				
			||||||
 | 
					                     break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -124,6 +124,10 @@ namespace OpenSim.Grid.UserServer
 | 
				
			||||||
            m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
 | 
					            m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin);
 | 
					            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)
 | 
					            if (Cfg.EnableLLSDLogin)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					@ -294,10 +298,7 @@ namespace OpenSim.Grid.UserServer
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case "login-reset":
 | 
					                case "login-reset":
 | 
				
			||||||
                    if (cmdparams.Length == 1)
 | 
					                     m_loginService.setloginlevel(0);
 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        m_loginService.setloginlevel(0);
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case "login-text":
 | 
					                case "login-text":
 | 
				
			||||||
                    if (cmdparams.Length == 1)
 | 
					                    if (cmdparams.Length == 1)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue