From ba723a4cf65e7a82f5072eaab51dc008f4a2bfd9 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Fri, 21 Nov 2008 22:14:57 +0000 Subject: Refactor: Scene.ExternalChecks -> Scene.Permissions. Also make all the internals of the permissions module adapter sane --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 15ce756..7ccd71c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5111,7 +5111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (m_host.ObjectOwner == parcel.landData.OwnerID || (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID - && parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) + && parcel.landData.IsGroupOwned) || World.Permissions.IsGod(m_host.OwnerID)) { av.StandUp(); } @@ -7408,7 +7408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (config.Configs["XEngine"].GetBoolean("AllowGodFunctions", false)) { - if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) + if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) { if (mask == ScriptBaseClass.MASK_BASE)//0 { @@ -7701,7 +7701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // according to the docs, this command only works if script owner and land owner are the same // 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; + if (!World.Permissions.CanEditParcel(m_host.ObjectOwner, landObject)) return; bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 3d1fe3b..08c2f2f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (x > 255 || x < 0 || y > 255 || y < 0) OSSLError("osTerrainSetHeight: Coordinate out of bounds"); - if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) + if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) { World.Heightmap[x, y] = val; return 1; @@ -309,7 +309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.High, "osRegionRestart"); m_host.AddScriptLPS(1); - if (World.ExternalChecks.ExternalChecksCanIssueEstateCommand(m_host.OwnerID, false)) + if (World.Permissions.CanIssueEstateCommand(m_host.OwnerID, false)) { World.Restart((float)seconds); return 1; @@ -461,7 +461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); - if (World.ExternalChecks.ExternalChecksCanRunConsoleCommand(m_host.OwnerID)) + if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) { MainConsole.Instance.RunCommand(command); return true; @@ -663,7 +663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); //Check to make sure that the script's owner is the estate manager/master //World.Permissions.GenericEstatePermission( - if (World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) + if (World.Permissions.IsGod(m_host.OwnerID)) { World.EventManager.TriggerRequestChangeWaterHeight((float)height); } -- cgit v1.1