From ed526916b7d6ad7adf0a8996efe5328f97d31d09 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 7 Jan 2017 16:27:06 +0000 Subject: update permissions module with the new options --- .../World/Permissions/PermissionsModule.cs | 37 ++++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index bdf314f..75d90f3 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -99,6 +99,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions private bool m_allowGridGods = false; private bool m_RegionOwnerIsGod = false; private bool m_RegionManagerIsGod = false; + private bool m_forceGridGodsOnly; + private bool m_forceGodModeAlwaysOn; + private bool m_allowGodActionsWithoutGodMode; private bool m_SimpleBuildPermissions = false; @@ -167,19 +170,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_Enabled = true; - m_allowGridGods = Util.GetConfigVarFromSections(config, "allow_grid_gods", - new string[] { "Startup", "Permissions" }, false); - m_bypassPermissions = !Util.GetConfigVarFromSections(config, "serverside_object_permissions", - new string[] { "Startup", "Permissions" }, true); - m_propagatePermissions = Util.GetConfigVarFromSections(config, "propagate_permissions", - new string[] { "Startup", "Permissions" }, true); - m_RegionOwnerIsGod = Util.GetConfigVarFromSections(config, "region_owner_is_god", - new string[] { "Startup", "Permissions" }, true); - m_RegionManagerIsGod = Util.GetConfigVarFromSections(config, "region_manager_is_god", - new string[] { "Startup", "Permissions" }, false); - - m_SimpleBuildPermissions = Util.GetConfigVarFromSections(config, "simple_build_permissions", - new string[] { "Startup", "Permissions" }, false); + string[] sections = new string[] { "Startup", "Permissions" }; + + m_allowGridGods = Util.GetConfigVarFromSections(config, "allow_grid_gods", sections, false); + m_bypassPermissions = !Util.GetConfigVarFromSections(config, "serverside_object_permissions", sections, true); + m_propagatePermissions = Util.GetConfigVarFromSections(config, "propagate_permissions", sections, true); + + m_forceGridGodsOnly = Util.GetConfigVarFromSections(config, "force_grid_gods_only", sections, false); + if(!m_forceGridGodsOnly) + { + m_RegionOwnerIsGod = Util.GetConfigVarFromSections(config, "region_owner_is_god",sections, true); + m_RegionManagerIsGod = Util.GetConfigVarFromSections(config, "region_manager_is_god",sections, false); + } + else + m_allowGridGods = true; + + m_forceGodModeAlwaysOn = Util.GetConfigVarFromSections(config, "automatic_gods", sections, false); + m_allowGodActionsWithoutGodMode = Util.GetConfigVarFromSections(config, "implicit_gods", sections, false); + if(m_allowGodActionsWithoutGodMode) + m_forceGodModeAlwaysOn = false; + + m_SimpleBuildPermissions = Util.GetConfigVarFromSections(config, "simple_build_permissions",sections, false); m_allowedScriptCreators = ParseUserSetConfigSetting(config, "allowed_script_creators", m_allowedScriptCreators); -- cgit v1.1