From 6c71a04da8150f7948df7a43f532e525d44cc4e7 Mon Sep 17 00:00:00 2001 From: mingchen Date: Thu, 8 May 2008 19:37:57 +0000 Subject: *Added all the permission checks to the sceneexternalchecks and modified permission module to follow this. *This makes permission checking much more modular; allows restrictive and granting module to be made without modifying the existing permission module --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 6 +++--- OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index e3bec9d..48b356a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -181,7 +181,7 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.AddScriptLPS(1); //Check to make sure that the script's owner is the estate manager/master //World.Permissions.GenericEstatePermission( - if (World.Permissions.GenericEstatePermission(m_host.OwnerID)) + if (World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) { World.EventManager.TriggerRequestChangeWaterHeight((float)height); } @@ -2647,7 +2647,7 @@ namespace OpenSim.Region.ScriptEngine.Common public void llModifyLand(int action, int brush) { m_host.AddScriptLPS(1); - if (World.Permissions.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) + if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) { NotImplemented("llModifyLand"); } @@ -3900,7 +3900,7 @@ namespace OpenSim.Region.ScriptEngine.Common { if (m_host.ObjectOwner == parcel.landData.ownerID || (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID - && parcel.landData.isGroupOwned) || World.Permissions.GenericEstatePermission(m_host.OwnerID)) + && parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) { av.StandUp(); } diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index ddca617..401042a 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -258,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (x > 255 || x < 0 || y > 255 || y < 0) LSLError("osTerrainSetHeight: Coordinate out of bounds"); - if (World.Permissions.CanTerraform(m_host.OwnerID, new LLVector3(x, y, 0))) + if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) { World.Heightmap[x, y] = val; return 1; @@ -281,7 +281,7 @@ namespace OpenSim.Region.ScriptEngine.Common public int osRegionRestart(double seconds) { m_host.AddScriptLPS(1); - if (World.Permissions.CanRestartSim(m_host.OwnerID)) + if (World.ExternalChecks.ExternalChecksCanRestartSim(m_host.OwnerID)) { World.Restart((float)seconds); return 1; @@ -406,7 +406,7 @@ namespace OpenSim.Region.ScriptEngine.Common if (config.Configs["LL-Functions"].GetBoolean("AllowosConsoleCommand", false)) { - if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) + if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) { MainConsole.Instance.RunCommand(command); return true; -- cgit v1.1