diff options
author | Charles Krinke | 2008-10-06 14:02:42 +0000 |
---|---|---|
committer | Charles Krinke | 2008-10-06 14:02:42 +0000 |
commit | f2ec151328a34bf9c2e20e2e6ff2695e69e91f69 (patch) | |
tree | b6f4cad4f7e0f120fce57b7406d4df16501a5fd1 | |
parent | adds admin_exists_user XmlRpc call. (diff) | |
download | opensim-SC_OLD-f2ec151328a34bf9c2e20e2e6ff2695e69e91f69.zip opensim-SC_OLD-f2ec151328a34bf9c2e20e2e6ff2695e69e91f69.tar.gz opensim-SC_OLD-f2ec151328a34bf9c2e20e2e6ff2695e69e91f69.tar.bz2 opensim-SC_OLD-f2ec151328a34bf9c2e20e2e6ff2695e69e91f69.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/UserConfig.cs | 13 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 9 |
2 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index 6cf526c..87ba271 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs | |||
@@ -46,6 +46,7 @@ namespace OpenSim.Framework | |||
46 | public string GridSendKey = String.Empty; | 46 | public string GridSendKey = String.Empty; |
47 | public uint HttpPort = DefaultHttpPort; | 47 | public uint HttpPort = DefaultHttpPort; |
48 | public bool HttpSSL = DefaultHttpSSL; | 48 | public bool HttpSSL = DefaultHttpSSL; |
49 | public uint DefaultUserLevel = 0; | ||
49 | 50 | ||
50 | private Uri m_inventoryUrl; | 51 | private Uri m_inventoryUrl; |
51 | 52 | ||
@@ -122,7 +123,11 @@ namespace OpenSim.Framework | |||
122 | configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | 123 | configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, |
123 | "Known good region Y", "1000", false); | 124 | "Known good region Y", "1000", false); |
124 | configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 125 | configMember.addConfigurationOption("enable_llsd_login", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
125 | "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false); | 126 | "Enable LLSD login support [Currently used by libsl based clients/bots]? true/false", true.ToString(), false); |
127 | |||
128 | configMember.addConfigurationOption("default_loginLevel", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, | ||
129 | "Minimum Level a user should have to login [0 default]", "0", false); | ||
130 | |||
126 | } | 131 | } |
127 | 132 | ||
128 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 133 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
@@ -165,9 +170,13 @@ namespace OpenSim.Framework | |||
165 | case "enable_llsd_login": | 170 | case "enable_llsd_login": |
166 | EnableLLSDLogin = (bool)configuration_result; | 171 | EnableLLSDLogin = (bool)configuration_result; |
167 | break; | 172 | break; |
173 | |||
174 | case "default_loginLevel": | ||
175 | DefaultUserLevel = (uint)configuration_result; | ||
176 | break; | ||
168 | } | 177 | } |
169 | 178 | ||
170 | return true; | 179 | return true; |
171 | } | 180 | } |
172 | } | 181 | } |
173 | } \ No newline at end of file | 182 | } |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index e24b486..787679e 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -124,6 +124,10 @@ namespace OpenSim.Grid.UserServer | |||
124 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 124 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
125 | 125 | ||
126 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); | 126 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); |
127 | // | ||
128 | // Get the minimum defaultLevel to access to the grid | ||
129 | // | ||
130 | m_loginService.setloginlevel((int)Cfg.DefaultUserLevel); | ||
127 | 131 | ||
128 | if (Cfg.EnableLLSDLogin) | 132 | if (Cfg.EnableLLSDLogin) |
129 | { | 133 | { |
@@ -294,10 +298,7 @@ namespace OpenSim.Grid.UserServer | |||
294 | } | 298 | } |
295 | break; | 299 | break; |
296 | case "login-reset": | 300 | case "login-reset": |
297 | if (cmdparams.Length == 1) | 301 | m_loginService.setloginlevel(0); |
298 | { | ||
299 | m_loginService.setloginlevel(0); | ||
300 | } | ||
301 | break; | 302 | break; |
302 | case "login-text": | 303 | case "login-text": |
303 | if (cmdparams.Length == 1) | 304 | if (cmdparams.Length == 1) |