From ee12b00cfa829d798ebf6490a8297710047b8f5c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 28 Jan 2010 14:34:31 +0000 Subject: [PATCH] Fixes inconsistencies in the permissions module. Adds a region_manager_is_god configurable. Previously, estate managers could enter god mode, but would not have any powers. Now estate managers can enter god mode only if this option is true, and then will have real god powers. --- .../World/Permissions/PermissionsModule.cs | 11 +++++++---- bin/OpenSim.ini.example | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 68e8485daf..5b15065549 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -127,6 +127,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions private bool m_debugPermissions = false; private bool m_allowGridGods = false; private bool m_RegionOwnerIsGod = false; + private bool m_RegionManagerIsGod = false; private bool m_ParcelOwnerIsGod = false; /// @@ -167,6 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", false); 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_allowedScriptCreators @@ -528,10 +530,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) { - if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) + if (m_scene.RegionInfo.EstateSettings.EstateOwner == user && m_RegionOwnerIsGod) return true; } + if (IsEstateManager(user) && m_RegionManagerIsGod) + return true; + if (m_allowGridGods) { CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(user); @@ -544,6 +549,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return false; } + protected bool IsFriendWithPerms(UUID user,UUID objectOwner) { @@ -948,9 +954,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; - if (IsEstateManager(user) && m_RegionOwnerIsGod) - return true; - return IsAdministrator(user); } diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 179c536d32..ebc9b24e74 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -207,6 +207,7 @@ ; 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