aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs54
-rw-r--r--OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs5
-rw-r--r--bin/OpenSim.ini.example88
-rw-r--r--bin/OpenSimDefaults.ini97
4 files changed, 129 insertions, 115 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
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index ef35b17..0eb43a2 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -220,50 +220,6 @@
220 ; physics = basicphysics 220 ; physics = basicphysics
221 ; physics = POS 221 ; physics = POS
222 222
223 ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule
224 ;; Permission modules to use, separated by comma.
225 ;; Possible modules are DefaultPermissionsModule, PrimLimitsModule
226 ; permissionmodules = DefaultPermissionsModule
227
228 ;# {serverside_object_permissions} {permissionmodules:DefaultPermissionsModule} {Activate permission handling by the sim?} {true false} true
229 ;; These are the parameters for the default permissions module
230 ;;
231 ;; If set to false, then, in theory, the server never carries out
232 ;; permission checks (allowing anybody to copy
233 ;; any item, etc. This may not yet be implemented uniformally.
234 ;; If set to true, then all permissions checks are carried out
235 ; serverside_object_permissions = true
236
237 ;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
238 ;; This allows users with a UserLevel of 200 or more to assume god
239 ;; powers in the regions in this simulator.
240 ; allow_grid_gods = false
241
242 ;; This allows some control over permissions
243 ;; please note that this still doesn't duplicate SL, and is not intended to
244 ;# {region_owner_is_god} {} {Allow region owner gods} {true false} true
245 ;; Allow region owners to assume god powers in their regions
246 ; region_owner_is_god = true
247
248 ;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
249 ;; Allow region managers to assume god powers in regions they manage
250 ; region_manager_is_god = false
251
252 ;# {parcel_owner_is_god} {} {Allow parcel owner gods} {true false} true
253 ;; Allow parcel owners to assume god powers in their parcels
254 ; parcel_owner_is_god = true
255
256 ;# {simple_build_permissions} {} {Allow building in parcel by access list (no groups)} {true false} false
257 ;; More control over permissions
258 ;; This is definitely not SL!
259 ;; Provides a simple control for land owners to give build rights to
260 ;; specific avatars in publicly accessible parcels that disallow object
261 ;; creation in general.
262 ;; Owners specific avatars by adding them to the Access List of the parcel
263 ;; without having to use the Groups feature
264 ; simple_build_permissions = false
265
266
267 ;# {DefaultScriptEngine} {} {Default script engine} {XEngine} XEngine 223 ;# {DefaultScriptEngine} {} {Default script engine} {XEngine} XEngine
268 ;; Default script engine to use. Currently, we only have XEngine 224 ;; Default script engine to use. Currently, we only have XEngine
269 ; DefaultScriptEngine = "XEngine" 225 ; DefaultScriptEngine = "XEngine"
@@ -334,6 +290,50 @@
334 ;; got a large number of objects, so you can turn it off here if you'd like. 290 ;; got a large number of objects, so you can turn it off here if you'd like.
335 ; DrawPrimOnMapTile = true 291 ; DrawPrimOnMapTile = true
336 292
293[Permissions]
294 ;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule
295 ;; Permission modules to use, separated by comma.
296 ;; Possible modules are DefaultPermissionsModule, PrimLimitsModule
297 ; permissionmodules = DefaultPermissionsModule
298
299 ;# {serverside_object_permissions} {permissionmodules:DefaultPermissionsModule} {Activate permission handling by the sim?} {true false} true
300 ;; These are the parameters for the default permissions module
301 ;;
302 ;; If set to false, then, in theory, the server never carries out
303 ;; permission checks (allowing anybody to copy
304 ;; any item, etc. This may not yet be implemented uniformally.
305 ;; If set to true, then all permissions checks are carried out
306 ; serverside_object_permissions = true
307
308 ;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
309 ;; This allows users with a UserLevel of 200 or more to assume god
310 ;; powers in the regions in this simulator.
311 ; allow_grid_gods = false
312
313 ;; This allows some control over permissions
314 ;; please note that this still doesn't duplicate SL, and is not intended to
315 ;# {region_owner_is_god} {} {Allow region owner gods} {true false} true
316 ;; Allow region owners to assume god powers in their regions
317 ; region_owner_is_god = true
318
319 ;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
320 ;; Allow region managers to assume god powers in regions they manage
321 ; region_manager_is_god = false
322
323 ;# {parcel_owner_is_god} {} {Allow parcel owner gods} {true false} true
324 ;; Allow parcel owners to assume god powers in their parcels
325 ; parcel_owner_is_god = true
326
327 ;# {simple_build_permissions} {} {Allow building in parcel by access list (no groups)} {true false} false
328 ;; More control over permissions
329 ;; This is definitely not SL!
330 ;; Provides a simple control for land owners to give build rights to
331 ;; specific avatars in publicly accessible parcels that disallow object
332 ;; creation in general.
333 ;; Owners specific avatars by adding them to the Access List of the parcel
334 ;; without having to use the Groups feature
335 ; simple_build_permissions = false
336
337 337
338[Estates] 338[Estates]
339 ; If these values are commented out then the user will be asked for estate details when required (this is the normal case). 339 ; If these values are commented out then the user will be asked for estate details when required (this is the normal case).
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 6ecb5df..091107f 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -231,54 +231,6 @@
231 ;physics = BulletSim 231 ;physics = BulletSim
232 232
233 ; ## 233 ; ##
234 ; ## PERMISSIONS
235 ; ##
236
237 ;permissionmodules = "DefaultPermissionsModule"
238
239 ; If set to false, then, in theory, the server never carries out permission checks (allowing anybody to copy
240 ; any item, etc. This may not yet be implemented uniformally.
241 ; If set to true, then all permissions checks are carried out
242 ; Default is true
243 serverside_object_permissions = true
244
245 allow_grid_gods = false
246
247 ; This allows somne control over permissions
248 ; please note that this still doesn't duplicate SL, and is not intended to
249 ;region_owner_is_god = true
250 ;region_manager_is_god = false
251 ;parcel_owner_is_god = true
252
253 ; Control user types that are allowed to create new scripts
254 ; Only enforced if serviceside_object_permissions is true
255 ;
256 ; Current possible values are
257 ; all - anyone can create scripts (subject to normal permissions)
258 ; gods - only administrators can create scripts (as long as allow_grid_gods is true)
259 ; Default value is all
260 ; allowed_script_creators = all
261
262 ; Control user types that are allowed to edit (save) scripts
263 ; Only enforced if serviceside_object_permissions is true
264 ;
265 ; Current possible values are
266 ; all - anyone can edit scripts (subject to normal permissions)
267 ; gods - only administrators can edit scripts (as long as allow_grid_gods is true)
268 ; Default value is all
269 ; allowed_script_editors = all
270
271 ; Provides a simple control for land owners to give build rights to specific avatars
272 ; in publicly accessible parcels that disallow object creation in general.
273 ; Owners specific avatars by adding them to the Access List of the parcel
274 ; without having to use the Groups feature
275 ; Disabled by default
276 ; simple_build_permissions = False
277
278 ; Minimum user level required to upload assets
279 ;LevelUpload = 0
280
281 ; ##
282 ; ## SCRIPT ENGINE 234 ; ## SCRIPT ENGINE
283 ; ## 235 ; ##
284 236
@@ -344,6 +296,55 @@
344 ; Use terrain texture for maptiles if true, use shaded green if false 296 ; Use terrain texture for maptiles if true, use shaded green if false
345 TextureOnMapTile = true 297 TextureOnMapTile = true
346 298
299[Permissions]
300 ; ##
301 ; ## PERMISSIONS
302 ; ##
303
304 ;permissionmodules = "DefaultPermissionsModule"
305
306 ; If set to false, then, in theory, the server never carries out permission checks (allowing anybody to copy
307 ; any item, etc. This may not yet be implemented uniformally.
308 ; If set to true, then all permissions checks are carried out
309 ; Default is true
310 serverside_object_permissions = true
311
312 allow_grid_gods = false
313
314 ; This allows somne control over permissions
315 ; please note that this still doesn't duplicate SL, and is not intended to
316 ;region_owner_is_god = true
317 ;region_manager_is_god = false
318 ;parcel_owner_is_god = true
319
320 ; Control user types that are allowed to create new scripts
321 ; Only enforced if serviceside_object_permissions is true
322 ;
323 ; Current possible values are
324 ; all - anyone can create scripts (subject to normal permissions)
325 ; gods - only administrators can create scripts (as long as allow_grid_gods is true)
326 ; Default value is all
327 ; allowed_script_creators = all
328
329 ; Control user types that are allowed to edit (save) scripts
330 ; Only enforced if serviceside_object_permissions is true
331 ;
332 ; Current possible values are
333 ; all - anyone can edit scripts (subject to normal permissions)
334 ; gods - only administrators can edit scripts (as long as allow_grid_gods is true)
335 ; Default value is all
336 ; allowed_script_editors = all
337
338 ; Provides a simple control for land owners to give build rights to specific avatars
339 ; in publicly accessible parcels that disallow object creation in general.
340 ; Owners specific avatars by adding them to the Access List of the parcel
341 ; without having to use the Groups feature
342 ; Disabled by default
343 ; simple_build_permissions = False
344
345 ; Minimum user level required to upload assets
346 ;LevelUpload = 0
347
347 348
348[RegionReady] 349[RegionReady]
349 ; Enable this module to get notified once all items and scripts in the region have been completely loaded and compiled 350 ; Enable this module to get notified once all items and scripts in the region have been completely loaded and compiled