From 32785921d0a4a074b92da0f4ec322cf451a4642f Mon Sep 17 00:00:00 2001 From: mingchen Date: Tue, 13 May 2008 16:22:57 +0000 Subject: *Complete redo of the permissions module *Removed hardcoded permissions checks *Added permissions checks where needed --- .../Environment/Modules/World/Land/LandChannel.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index 2a28283..b5d5e6e 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs @@ -400,7 +400,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land //If we are still here, then they are subdividing within one piece of land //Check owner - if (startLandObject.landData.ownerID != attempting_user_id) + if (!m_scene.ExternalChecks.ExternalChecksCanEditParcel(attempting_user_id,startLandObject)) { return; } @@ -469,7 +469,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land { return; } - if (masterLandObject.landData.ownerID != attempting_user_id) + if (!m_scene.ExternalChecks.ExternalChecksCanEditParcel(attempting_user_id, masterLandObject)) { return; } @@ -655,6 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client) { + landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client); } @@ -663,6 +664,18 @@ namespace OpenSim.Region.Environment.Modules.World.Land landList[local_id].sendLandObjectOwners(remote_client); } + public void handleParcelAbandonRequest(int local_id, IClientAPI remote_client) + { + if (landList.ContainsKey(local_id)) + { + if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) + { + landList[local_id].landData.ownerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; + m_scene.Broadcast(SendParcelOverlay); + } + } + + } #endregion #region ILandChannel Members -- cgit v1.1