aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2013-03-01 15:24:22 -0800
committerDiva Canto2013-03-01 15:24:22 -0800
commit20530ee66723faa78ab8cf93c096fa4626c3c701 (patch)
treee7db0a6b62689a80d97aadabac8cbaac016ccfaa /OpenSim
parentRemoved more vars from [Startup]. I think these were already moved elsewhere,... (diff)
downloadopensim-SC_OLD-20530ee66723faa78ab8cf93c096fa4626c3c701.zip
opensim-SC_OLD-20530ee66723faa78ab8cf93c096fa4626c3c701.tar.gz
opensim-SC_OLD-20530ee66723faa78ab8cf93c096fa4626c3c701.tar.bz2
opensim-SC_OLD-20530ee66723faa78ab8cf93c096fa4626c3c701.tar.xz
Moved permissions config vars out of [Startup] into [Permissions]. Backwards compatible ([Startup] still being looked up), but please update your configs sometime soon.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs54
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs5
2 files changed, 36 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index ddaa227..121fb2a 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -156,9 +156,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
156 156
157 public void Initialise(IConfigSource config) 157 public void Initialise(IConfigSource config)
158 { 158 {
159 IConfig myConfig = config.Configs["Startup"]; 159 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
160 160 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
161 string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
162 161
163 List<string> modules = new List<string>(permissionModules.Split(',')); 162 List<string> modules = new List<string>(permissionModules.Split(','));
164 163
@@ -167,26 +166,34 @@ namespace OpenSim.Region.CoreModules.World.Permissions
167 166
168 m_Enabled = true; 167 m_Enabled = true;
169 168
170 m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false); 169 m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods",
171 m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); 170 new string[] { "Startup", "Permissions" }, false);
172 m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true); 171 m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions",
173 m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true); 172 new string[] { "Startup", "Permissions" }, true);
174 m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false); 173 m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions",
175 m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true); 174 new string[] { "Startup", "Permissions" }, true);
176 175 m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",
177 m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false); 176 new string[] { "Startup", "Permissions" }, true);
177 m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",
178 new string[] { "Startup", "Permissions" }, false);
179 m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god",
180 new string[] { "Startup", "Permissions" }, true);
181
182 m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions",
183 new string[] { "Startup", "Permissions" }, false);
178 184
179 m_allowedScriptCreators 185 m_allowedScriptCreators
180 = ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators); 186 = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators);
181 m_allowedScriptEditors 187 m_allowedScriptEditors
182 = ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors); 188 = ParseUserSetConfigSetting(config, "allowed_script_editors", m_allowedScriptEditors);
183 189
184 if (m_bypassPermissions) 190 if (m_bypassPermissions)
185 m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks"); 191 m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks");
186 else 192 else
187 m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks"); 193 m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
188 194
189 string grant = myConfig.GetString("GrantLSL", ""); 195 string grant = Util.GetConfigVarFromSections<string>(config, "GrantLSL",
196 new string[] { "Startup", "Permissions" }, string.Empty);
190 if (grant.Length > 0) 197 if (grant.Length > 0)
191 { 198 {
192 foreach (string uuidl in grant.Split(',')) 199 foreach (string uuidl in grant.Split(','))
@@ -196,7 +203,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
196 } 203 }
197 } 204 }
198 205
199 grant = myConfig.GetString("GrantCS", ""); 206 grant = Util.GetConfigVarFromSections<string>(config, "GrantCS",
207 new string[] { "Startup", "Permissions" }, string.Empty);
200 if (grant.Length > 0) 208 if (grant.Length > 0)
201 { 209 {
202 foreach (string uuidl in grant.Split(',')) 210 foreach (string uuidl in grant.Split(','))
@@ -206,7 +214,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
206 } 214 }
207 } 215 }
208 216
209 grant = myConfig.GetString("GrantVB", ""); 217 grant = Util.GetConfigVarFromSections<string>(config, "GrantVB",
218 new string[] { "Startup", "Permissions" }, string.Empty);
210 if (grant.Length > 0) 219 if (grant.Length > 0)
211 { 220 {
212 foreach (string uuidl in grant.Split(',')) 221 foreach (string uuidl in grant.Split(','))
@@ -216,7 +225,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
216 } 225 }
217 } 226 }
218 227
219 grant = myConfig.GetString("GrantJS", ""); 228 grant = Util.GetConfigVarFromSections<string>(config, "GrantJS",
229 new string[] { "Startup", "Permissions" }, string.Empty);
220 if (grant.Length > 0) 230 if (grant.Length > 0)
221 { 231 {
222 foreach (string uuidl in grant.Split(',')) 232 foreach (string uuidl in grant.Split(','))
@@ -226,7 +236,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
226 } 236 }
227 } 237 }
228 238
229 grant = myConfig.GetString("GrantYP", ""); 239 grant = Util.GetConfigVarFromSections<string>(config, "GrantYP",
240 new string[] { "Startup", "Permissions" }, string.Empty);
230 if (grant.Length > 0) 241 if (grant.Length > 0)
231 { 242 {
232 foreach (string uuidl in grant.Split(',')) 243 foreach (string uuidl in grant.Split(','))
@@ -464,11 +475,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
464 /// <param name="settingName"></param> 475 /// <param name="settingName"></param>
465 /// <param name="defaultValue">The default value for this attribute</param> 476 /// <param name="defaultValue">The default value for this attribute</param>
466 /// <returns>The parsed value</returns> 477 /// <returns>The parsed value</returns>
467 private static UserSet ParseUserSetConfigSetting(IConfig config, string settingName, UserSet defaultValue) 478 private static UserSet ParseUserSetConfigSetting(IConfigSource config, string settingName, UserSet defaultValue)
468 { 479 {
469 UserSet userSet = defaultValue; 480 UserSet userSet = defaultValue;
470 481
471 string rawSetting = config.GetString(settingName, defaultValue.ToString()); 482 string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName,
483 new string[] {"Startup", "Permissions"}, defaultValue.ToString());
472 484
473 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term 485 // Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term
474 // this should disappear. 486 // this should disappear.
diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
index c1957e2..a6d43f1 100644
--- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
+++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs
@@ -57,9 +57,10 @@ namespace OpenSim.Region.OptionalModules
57 57
58 public void Initialise(IConfigSource config) 58 public void Initialise(IConfigSource config)
59 { 59 {
60 IConfig myConfig = config.Configs["Startup"]; 60 //IConfig myConfig = config.Configs["Startup"];
61 61
62 string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule"); 62 string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
63 new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
63 64
64 List<string> modules=new List<string>(permissionModules.Split(',')); 65 List<string> modules=new List<string>(permissionModules.Split(','));
65 66