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 --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 51c7184..5bd2e6c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -5070,13 +5070,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { case "getinfo": - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice); } break; case "setregioninfo": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter),convertParamStringToBool(messagePacket.ParamList[1].Parameter), convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), @@ -5089,7 +5089,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP break; case "texturebase": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) { @@ -5104,7 +5104,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "texturedetail": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) { @@ -5122,7 +5122,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP break; case "textureheights": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) { @@ -5143,7 +5143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OnCommitEstateTerrainTextureRequest(this); break; case "setregionterrain": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { if (messagePacket.ParamList.Length != 9) { @@ -5178,7 +5178,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP break; case "restart": - if (((Scene)m_scene).Permissions.CanRestartSim(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanRestartSim(this.AgentId)) { // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) @@ -5192,7 +5192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "estatechangecovenantid": - if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) { foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) { @@ -5202,7 +5202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice,estateAccessType,new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter))); @@ -5210,7 +5210,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "simulatormessage": - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { LLUUID invoice = messagePacket.MethodData.Invoice; LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); @@ -5221,7 +5221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "instantmessage": - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { LLUUID invoice = messagePacket.MethodData.Invoice; LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); @@ -5232,7 +5232,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "setregiondebug": - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { LLUUID invoice = messagePacket.MethodData.Invoice; LLUUID SenderID = messagePacket.AgentData.AgentID; @@ -5244,7 +5244,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; case "teleporthomeuser": - if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) + if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) { LLUUID invoice = messagePacket.MethodData.Invoice; LLUUID SenderID = messagePacket.AgentData.AgentID; -- cgit v1.1