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_reset
0.6.0-stable
Charles Krinke 2008-10-06 14:02:42 +00:00
parent ec2970f6b4
commit f2ec151328
2 changed files with 16 additions and 6 deletions

View File

@ -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;
@ -122,7 +123,11 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
"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);
"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,9 +170,13 @@ namespace OpenSim.Framework
case "enable_llsd_login":
EnableLLSDLogin = (bool)configuration_result;
break;
case "default_loginLevel":
DefaultUserLevel = (uint)configuration_result;
break;
}
return true;
}
}
}
}

View File

@ -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);
}
m_loginService.setloginlevel(0);
break;
case "login-text":
if (cmdparams.Length == 1)