Moved permissions config vars out of [Startup] into [Permissions]. Backwards compatible ([Startup] still being looked up), but please update your configs sometime soon.
parent
efa7227865
commit
20530ee667
|
@ -156,9 +156,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig myConfig = config.Configs["Startup"];
|
||||
|
||||
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
||||
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
||||
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
||||
|
||||
List<string> modules = new List<string>(permissionModules.Split(','));
|
||||
|
||||
|
@ -167,26 +166,34 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
|
||||
m_Enabled = true;
|
||||
|
||||
m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false);
|
||||
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
|
||||
m_propagatePermissions = myConfig.GetBoolean("propagate_permissions", true);
|
||||
m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true);
|
||||
m_RegionManagerIsGod = myConfig.GetBoolean("region_manager_is_god", false);
|
||||
m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true);
|
||||
m_allowGridGods = Util.GetConfigVarFromSections<bool>(config, "allow_grid_gods",
|
||||
new string[] { "Startup", "Permissions" }, false);
|
||||
m_bypassPermissions = !Util.GetConfigVarFromSections<bool>(config, "serverside_object_permissions",
|
||||
new string[] { "Startup", "Permissions" }, true);
|
||||
m_propagatePermissions = Util.GetConfigVarFromSections<bool>(config, "propagate_permissions",
|
||||
new string[] { "Startup", "Permissions" }, true);
|
||||
m_RegionOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_owner_is_god",
|
||||
new string[] { "Startup", "Permissions" }, true);
|
||||
m_RegionManagerIsGod = Util.GetConfigVarFromSections<bool>(config, "region_manager_is_god",
|
||||
new string[] { "Startup", "Permissions" }, false);
|
||||
m_ParcelOwnerIsGod = Util.GetConfigVarFromSections<bool>(config, "parcel_owner_is_god",
|
||||
new string[] { "Startup", "Permissions" }, true);
|
||||
|
||||
m_SimpleBuildPermissions = myConfig.GetBoolean("simple_build_permissions", false);
|
||||
m_SimpleBuildPermissions = Util.GetConfigVarFromSections<bool>(config, "simple_build_permissions",
|
||||
new string[] { "Startup", "Permissions" }, false);
|
||||
|
||||
m_allowedScriptCreators
|
||||
= ParseUserSetConfigSetting(myConfig, "allowed_script_creators", m_allowedScriptCreators);
|
||||
= ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators);
|
||||
m_allowedScriptEditors
|
||||
= ParseUserSetConfigSetting(myConfig, "allowed_script_editors", m_allowedScriptEditors);
|
||||
= ParseUserSetConfigSetting(config, "allowed_script_editors", m_allowedScriptEditors);
|
||||
|
||||
if (m_bypassPermissions)
|
||||
m_log.Info("[PERMISSIONS]: serverside_object_permissions = false in ini file so disabling all region service permission checks");
|
||||
else
|
||||
m_log.Debug("[PERMISSIONS]: Enabling all region service permission checks");
|
||||
|
||||
string grant = myConfig.GetString("GrantLSL", "");
|
||||
string grant = Util.GetConfigVarFromSections<string>(config, "GrantLSL",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string uuidl in grant.Split(','))
|
||||
|
@ -196,7 +203,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
}
|
||||
|
||||
grant = myConfig.GetString("GrantCS", "");
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "GrantCS",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string uuidl in grant.Split(','))
|
||||
|
@ -206,7 +214,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
}
|
||||
|
||||
grant = myConfig.GetString("GrantVB", "");
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "GrantVB",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string uuidl in grant.Split(','))
|
||||
|
@ -216,7 +225,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
}
|
||||
|
||||
grant = myConfig.GetString("GrantJS", "");
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "GrantJS",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string uuidl in grant.Split(','))
|
||||
|
@ -226,7 +236,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
}
|
||||
}
|
||||
|
||||
grant = myConfig.GetString("GrantYP", "");
|
||||
grant = Util.GetConfigVarFromSections<string>(config, "GrantYP",
|
||||
new string[] { "Startup", "Permissions" }, string.Empty);
|
||||
if (grant.Length > 0)
|
||||
{
|
||||
foreach (string uuidl in grant.Split(','))
|
||||
|
@ -464,11 +475,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
/// <param name="settingName"></param>
|
||||
/// <param name="defaultValue">The default value for this attribute</param>
|
||||
/// <returns>The parsed value</returns>
|
||||
private static UserSet ParseUserSetConfigSetting(IConfig config, string settingName, UserSet defaultValue)
|
||||
private static UserSet ParseUserSetConfigSetting(IConfigSource config, string settingName, UserSet defaultValue)
|
||||
{
|
||||
UserSet userSet = defaultValue;
|
||||
|
||||
string rawSetting = config.GetString(settingName, defaultValue.ToString());
|
||||
string rawSetting = Util.GetConfigVarFromSections<string>(config, settingName,
|
||||
new string[] {"Startup", "Permissions"}, defaultValue.ToString());
|
||||
|
||||
// Temporary measure to allow 'gods' to be specified in config for consistency's sake. In the long term
|
||||
// this should disappear.
|
||||
|
|
|
@ -57,9 +57,10 @@ namespace OpenSim.Region.OptionalModules
|
|||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig myConfig = config.Configs["Startup"];
|
||||
//IConfig myConfig = config.Configs["Startup"];
|
||||
|
||||
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
|
||||
string permissionModules = Util.GetConfigVarFromSections<string>(config, "permissionmodules",
|
||||
new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule");
|
||||
|
||||
List<string> modules=new List<string>(permissionModules.Split(','));
|
||||
|
||||
|
|
|
@ -220,50 +220,6 @@
|
|||
; physics = basicphysics
|
||||
; physics = POS
|
||||
|
||||
;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule
|
||||
;; Permission modules to use, separated by comma.
|
||||
;; Possible modules are DefaultPermissionsModule, PrimLimitsModule
|
||||
; permissionmodules = DefaultPermissionsModule
|
||||
|
||||
;# {serverside_object_permissions} {permissionmodules:DefaultPermissionsModule} {Activate permission handling by the sim?} {true false} true
|
||||
;; These are the parameters for the default permissions module
|
||||
;;
|
||||
;; If set to false, then, in theory, the server never carries out
|
||||
;; permission checks (allowing anybody to copy
|
||||
;; any item, etc. This may not yet be implemented uniformally.
|
||||
;; If set to true, then all permissions checks are carried out
|
||||
; serverside_object_permissions = true
|
||||
|
||||
;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
|
||||
;; This allows users with a UserLevel of 200 or more to assume god
|
||||
;; powers in the regions in this simulator.
|
||||
; allow_grid_gods = false
|
||||
|
||||
;; This allows some control over permissions
|
||||
;; please note that this still doesn't duplicate SL, and is not intended to
|
||||
;# {region_owner_is_god} {} {Allow region owner gods} {true false} true
|
||||
;; Allow region owners to assume god powers in their regions
|
||||
; region_owner_is_god = true
|
||||
|
||||
;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
|
||||
;; Allow region managers to assume god powers in regions they manage
|
||||
; region_manager_is_god = false
|
||||
|
||||
;# {parcel_owner_is_god} {} {Allow parcel owner gods} {true false} true
|
||||
;; Allow parcel owners to assume god powers in their parcels
|
||||
; parcel_owner_is_god = true
|
||||
|
||||
;# {simple_build_permissions} {} {Allow building in parcel by access list (no groups)} {true false} false
|
||||
;; More control over permissions
|
||||
;; This is definitely not SL!
|
||||
;; Provides a simple control for land owners to give build rights to
|
||||
;; specific avatars in publicly accessible parcels that disallow object
|
||||
;; creation in general.
|
||||
;; Owners specific avatars by adding them to the Access List of the parcel
|
||||
;; without having to use the Groups feature
|
||||
; simple_build_permissions = false
|
||||
|
||||
|
||||
;# {DefaultScriptEngine} {} {Default script engine} {XEngine} XEngine
|
||||
;; Default script engine to use. Currently, we only have XEngine
|
||||
; DefaultScriptEngine = "XEngine"
|
||||
|
@ -334,6 +290,50 @@
|
|||
;; got a large number of objects, so you can turn it off here if you'd like.
|
||||
; DrawPrimOnMapTile = true
|
||||
|
||||
[Permissions]
|
||||
;# {permissionmodules} {} {Permission modules to use (may specify multiple modules, separated by comma} {} DefaultPermissionsModule
|
||||
;; Permission modules to use, separated by comma.
|
||||
;; Possible modules are DefaultPermissionsModule, PrimLimitsModule
|
||||
; permissionmodules = DefaultPermissionsModule
|
||||
|
||||
;# {serverside_object_permissions} {permissionmodules:DefaultPermissionsModule} {Activate permission handling by the sim?} {true false} true
|
||||
;; These are the parameters for the default permissions module
|
||||
;;
|
||||
;; If set to false, then, in theory, the server never carries out
|
||||
;; permission checks (allowing anybody to copy
|
||||
;; any item, etc. This may not yet be implemented uniformally.
|
||||
;; If set to true, then all permissions checks are carried out
|
||||
; serverside_object_permissions = true
|
||||
|
||||
;# {allow_grid_gods} {} {Allow grid gods?} {true false} false
|
||||
;; This allows users with a UserLevel of 200 or more to assume god
|
||||
;; powers in the regions in this simulator.
|
||||
; allow_grid_gods = false
|
||||
|
||||
;; This allows some control over permissions
|
||||
;; please note that this still doesn't duplicate SL, and is not intended to
|
||||
;# {region_owner_is_god} {} {Allow region owner gods} {true false} true
|
||||
;; Allow region owners to assume god powers in their regions
|
||||
; region_owner_is_god = true
|
||||
|
||||
;# {region_manager_is_god} {} {Allow region manager gods} {true false} false
|
||||
;; Allow region managers to assume god powers in regions they manage
|
||||
; region_manager_is_god = false
|
||||
|
||||
;# {parcel_owner_is_god} {} {Allow parcel owner gods} {true false} true
|
||||
;; Allow parcel owners to assume god powers in their parcels
|
||||
; parcel_owner_is_god = true
|
||||
|
||||
;# {simple_build_permissions} {} {Allow building in parcel by access list (no groups)} {true false} false
|
||||
;; More control over permissions
|
||||
;; This is definitely not SL!
|
||||
;; Provides a simple control for land owners to give build rights to
|
||||
;; specific avatars in publicly accessible parcels that disallow object
|
||||
;; creation in general.
|
||||
;; Owners specific avatars by adding them to the Access List of the parcel
|
||||
;; without having to use the Groups feature
|
||||
; simple_build_permissions = false
|
||||
|
||||
|
||||
[Estates]
|
||||
; If these values are commented out then the user will be asked for estate details when required (this is the normal case).
|
||||
|
|
|
@ -230,54 +230,6 @@
|
|||
;physics = modified_BulletX
|
||||
;physics = BulletSim
|
||||
|
||||
; ##
|
||||
; ## PERMISSIONS
|
||||
; ##
|
||||
|
||||
;permissionmodules = "DefaultPermissionsModule"
|
||||
|
||||
; If set to false, then, in theory, the server never carries out permission checks (allowing anybody to copy
|
||||
; any item, etc. This may not yet be implemented uniformally.
|
||||
; If set to true, then all permissions checks are carried out
|
||||
; Default is true
|
||||
serverside_object_permissions = true
|
||||
|
||||
allow_grid_gods = false
|
||||
|
||||
; This allows somne control over permissions
|
||||
; please note that this still doesn't duplicate SL, and is not intended to
|
||||
;region_owner_is_god = true
|
||||
;region_manager_is_god = false
|
||||
;parcel_owner_is_god = true
|
||||
|
||||
; Control user types that are allowed to create new scripts
|
||||
; Only enforced if serviceside_object_permissions is true
|
||||
;
|
||||
; Current possible values are
|
||||
; all - anyone can create scripts (subject to normal permissions)
|
||||
; gods - only administrators can create scripts (as long as allow_grid_gods is true)
|
||||
; Default value is all
|
||||
; allowed_script_creators = all
|
||||
|
||||
; Control user types that are allowed to edit (save) scripts
|
||||
; Only enforced if serviceside_object_permissions is true
|
||||
;
|
||||
; Current possible values are
|
||||
; all - anyone can edit scripts (subject to normal permissions)
|
||||
; gods - only administrators can edit scripts (as long as allow_grid_gods is true)
|
||||
; Default value is all
|
||||
; allowed_script_editors = all
|
||||
|
||||
; Provides a simple control for land owners to give build rights to specific avatars
|
||||
; in publicly accessible parcels that disallow object creation in general.
|
||||
; Owners specific avatars by adding them to the Access List of the parcel
|
||||
; without having to use the Groups feature
|
||||
; Disabled by default
|
||||
; simple_build_permissions = False
|
||||
|
||||
; Minimum user level required to upload assets
|
||||
;LevelUpload = 0
|
||||
|
||||
; ##
|
||||
; ## SCRIPT ENGINE
|
||||
; ##
|
||||
|
@ -344,6 +296,55 @@
|
|||
; Use terrain texture for maptiles if true, use shaded green if false
|
||||
TextureOnMapTile = true
|
||||
|
||||
[Permissions]
|
||||
; ##
|
||||
; ## PERMISSIONS
|
||||
; ##
|
||||
|
||||
;permissionmodules = "DefaultPermissionsModule"
|
||||
|
||||
; If set to false, then, in theory, the server never carries out permission checks (allowing anybody to copy
|
||||
; any item, etc. This may not yet be implemented uniformally.
|
||||
; If set to true, then all permissions checks are carried out
|
||||
; Default is true
|
||||
serverside_object_permissions = true
|
||||
|
||||
allow_grid_gods = false
|
||||
|
||||
; This allows somne control over permissions
|
||||
; please note that this still doesn't duplicate SL, and is not intended to
|
||||
;region_owner_is_god = true
|
||||
;region_manager_is_god = false
|
||||
;parcel_owner_is_god = true
|
||||
|
||||
; Control user types that are allowed to create new scripts
|
||||
; Only enforced if serviceside_object_permissions is true
|
||||
;
|
||||
; Current possible values are
|
||||
; all - anyone can create scripts (subject to normal permissions)
|
||||
; gods - only administrators can create scripts (as long as allow_grid_gods is true)
|
||||
; Default value is all
|
||||
; allowed_script_creators = all
|
||||
|
||||
; Control user types that are allowed to edit (save) scripts
|
||||
; Only enforced if serviceside_object_permissions is true
|
||||
;
|
||||
; Current possible values are
|
||||
; all - anyone can edit scripts (subject to normal permissions)
|
||||
; gods - only administrators can edit scripts (as long as allow_grid_gods is true)
|
||||
; Default value is all
|
||||
; allowed_script_editors = all
|
||||
|
||||
; Provides a simple control for land owners to give build rights to specific avatars
|
||||
; in publicly accessible parcels that disallow object creation in general.
|
||||
; Owners specific avatars by adding them to the Access List of the parcel
|
||||
; without having to use the Groups feature
|
||||
; Disabled by default
|
||||
; simple_build_permissions = False
|
||||
|
||||
; Minimum user level required to upload assets
|
||||
;LevelUpload = 0
|
||||
|
||||
|
||||
[RegionReady]
|
||||
; Enable this module to get notified once all items and scripts in the region have been completely loaded and compiled
|
||||
|
|
Loading…
Reference in New Issue