From ceb4db5272cafc7485d2676a257b62818bc3fa80 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 30 Apr 2009 14:56:26 +0000 Subject: [PATCH] Fixed a bug in the permissions module, where if there were multiple admins, the client permissions flags were sent incorrectly, which stopped one admin being able to edit another admin's objects. Even thought the comments in the code said that admins should be able to edit each other's objects. --- .../World/Permissions/PermissionsModule.cs | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b8efc4aec4..6c6151ec3b 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -450,14 +450,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions return objectOwnerMask; } - // 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 && m_ParcelOwnerIsGod) - return objectOwnerMask; + //// 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 && m_ParcelOwnerIsGod) + // return objectOwnerMask; - // Admin objects should not be editable by the above - if (IsAdministrator(objectOwner)) - return objectEveryoneMask; + //// Admin objects should not be editable by the above + //if (IsAdministrator(objectOwner)) + // return objectEveryoneMask; // Estate users should be able to edit anything in the sim if (IsEstateManager(user) && m_RegionOwnerIsGod) @@ -467,6 +467,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (IsAdministrator(user)) return objectOwnerMask; + // 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 && m_ParcelOwnerIsGod) + { + uint responseMask = objectOwnerMask; + + // Admin objects should not be editable by the above + if (IsAdministrator(objectOwner)) + { + responseMask = objectEveryoneMask; + } + + return responseMask; + } return objectEveryoneMask; }