From 1db8f6fbad2533825f7178bf867e5fd649210dd1 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 17 Aug 2008 05:05:06 +0000 Subject: Patch for Adam: Add two new permissions options to Opensim.ini.example and the permissions module --- .../Environment/Modules/World/Permissions/PermissionsModule.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 2394a30..6107f48 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -66,6 +66,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions private bool m_bypassPermissionsValue = true; private bool m_debugPermissions = false; private bool m_allowGridGods = false; + private bool m_RegionOwnerIsGod = false; + private bool m_ParcelOwnerIsGod = false; #endregion @@ -142,6 +144,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions m_allowGridGods = myConfig.GetBoolean("allow_grid_gods", false); m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true); + m_RegionOwnerIsGod = myConfig.GetBoolean("region_owner_is_god", true); + m_ParcelOwnerIsGod = myConfig.GetBoolean("parcel_owner_is_god", true); if (m_bypassPermissions) m_log.Info("[PERMISSIONS]: serviceside_object_permissions = false in ini file so disabling all region service permission checks"); @@ -238,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) { - if (m_scene.RegionInfo.MasterAvatarAssignedUUID == user) + if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)) return true; } if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) @@ -346,7 +350,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions // Users should be able to edit what is over their land. ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); - if (parcel != null && parcel.landData.OwnerID == user) + if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) return objectOwnerMask; // Admin objects should not be editable by the above @@ -354,7 +358,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return objectEveryoneMask; // Estate users should be able to edit anything in the sim - if (IsEstateManager(user)) + if (IsEstateManager(user) && m_RegionOwnerIsGod) return objectOwnerMask; -- cgit v1.1