From 38a0a68091f0b969901db9644b986e261912105b Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sat, 11 Oct 2008 20:53:33 +0000 Subject: * Change permission check for llParcelMediaCommandList to use the permissions module, thus including estate owners and gods. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 165e213..6bda61e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7190,12 +7190,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); // according to the docs, this command only works if script owner and land owner are the same - UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); - if (landowner == UUID.Zero || landowner != m_host.ObjectOwner) return; + // lets add estate owners and gods, too, and use the generic permission check. + ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + if (!World.ExternalChecks.ExternalChecksCanEditParcel(m_host.ObjectOwner, landObject)) return; bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? - - LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + + LandData landData = landObject.landData; string url = landData.MediaURL; string texture = landData.MediaID.ToString(); bool autoAlign = landData.MediaAutoScale != 0; -- cgit v1.1