diff options
author | mingchen | 2008-05-08 19:37:57 +0000 |
---|---|---|
committer | mingchen | 2008-05-08 19:37:57 +0000 |
commit | 6c71a04da8150f7948df7a43f532e525d44cc4e7 (patch) | |
tree | e9ed76fd72fa84f9aad4ff5dec66972e08e93b82 /OpenSim/Region/ClientStack | |
parent | * Committing an extra bit of permissions for attaching to ensure that the per... (diff) | |
download | opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.zip opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.gz opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.bz2 opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.xz |
*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
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 26 |
1 files changed, 13 insertions, 13 deletions
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 | |||
5070 | { | 5070 | { |
5071 | case "getinfo": | 5071 | case "getinfo": |
5072 | 5072 | ||
5073 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5073 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5074 | { | 5074 | { |
5075 | OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice); | 5075 | OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice); |
5076 | } | 5076 | } |
5077 | break; | 5077 | break; |
5078 | case "setregioninfo": | 5078 | case "setregioninfo": |
5079 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5079 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5080 | { | 5080 | { |
5081 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter),convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 5081 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter),convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
5082 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 5082 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
@@ -5089,7 +5089,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5089 | 5089 | ||
5090 | break; | 5090 | break; |
5091 | case "texturebase": | 5091 | case "texturebase": |
5092 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5092 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5093 | { | 5093 | { |
5094 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5094 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5095 | { | 5095 | { |
@@ -5104,7 +5104,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5104 | } | 5104 | } |
5105 | break; | 5105 | break; |
5106 | case "texturedetail": | 5106 | case "texturedetail": |
5107 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5107 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5108 | { | 5108 | { |
5109 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5109 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5110 | { | 5110 | { |
@@ -5122,7 +5122,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5122 | 5122 | ||
5123 | break; | 5123 | break; |
5124 | case "textureheights": | 5124 | case "textureheights": |
5125 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5125 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5126 | { | 5126 | { |
5127 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5127 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5128 | { | 5128 | { |
@@ -5143,7 +5143,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5143 | OnCommitEstateTerrainTextureRequest(this); | 5143 | OnCommitEstateTerrainTextureRequest(this); |
5144 | break; | 5144 | break; |
5145 | case "setregionterrain": | 5145 | case "setregionterrain": |
5146 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5146 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5147 | { | 5147 | { |
5148 | if (messagePacket.ParamList.Length != 9) | 5148 | if (messagePacket.ParamList.Length != 9) |
5149 | { | 5149 | { |
@@ -5178,7 +5178,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5178 | 5178 | ||
5179 | break; | 5179 | break; |
5180 | case "restart": | 5180 | case "restart": |
5181 | if (((Scene)m_scene).Permissions.CanRestartSim(this.AgentId)) | 5181 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanRestartSim(this.AgentId)) |
5182 | { | 5182 | { |
5183 | // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. | 5183 | // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. |
5184 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5184 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
@@ -5192,7 +5192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5192 | } | 5192 | } |
5193 | break; | 5193 | break; |
5194 | case "estatechangecovenantid": | 5194 | case "estatechangecovenantid": |
5195 | if (((Scene)m_scene).Permissions.CanEditEstateTerrain(this.AgentId)) | 5195 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanEditEstateTerrain(this.AgentId)) |
5196 | { | 5196 | { |
5197 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) | 5197 | foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) |
5198 | { | 5198 | { |
@@ -5202,7 +5202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5202 | } | 5202 | } |
5203 | break; | 5203 | break; |
5204 | case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. | 5204 | case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. |
5205 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5205 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5206 | { | 5206 | { |
5207 | int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); | 5207 | int estateAccessType = Convert.ToInt16(Helpers.FieldToUTF8String(messagePacket.ParamList[1].Parameter)); |
5208 | OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice,estateAccessType,new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter))); | 5208 | OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice,estateAccessType,new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter))); |
@@ -5210,7 +5210,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5210 | } | 5210 | } |
5211 | break; | 5211 | break; |
5212 | case "simulatormessage": | 5212 | case "simulatormessage": |
5213 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5213 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5214 | { | 5214 | { |
5215 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5215 | LLUUID invoice = messagePacket.MethodData.Invoice; |
5216 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); | 5216 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); |
@@ -5221,7 +5221,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5221 | } | 5221 | } |
5222 | break; | 5222 | break; |
5223 | case "instantmessage": | 5223 | case "instantmessage": |
5224 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5224 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5225 | { | 5225 | { |
5226 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5226 | LLUUID invoice = messagePacket.MethodData.Invoice; |
5227 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); | 5227 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(messagePacket.ParamList[2].Parameter)); |
@@ -5232,7 +5232,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5232 | } | 5232 | } |
5233 | break; | 5233 | break; |
5234 | case "setregiondebug": | 5234 | case "setregiondebug": |
5235 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5235 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5236 | { | 5236 | { |
5237 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5237 | LLUUID invoice = messagePacket.MethodData.Invoice; |
5238 | LLUUID SenderID = messagePacket.AgentData.AgentID; | 5238 | LLUUID SenderID = messagePacket.AgentData.AgentID; |
@@ -5244,7 +5244,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5244 | } | 5244 | } |
5245 | break; | 5245 | break; |
5246 | case "teleporthomeuser": | 5246 | case "teleporthomeuser": |
5247 | if (((Scene)m_scene).Permissions.GenericEstatePermission(this.AgentId)) | 5247 | if (((Scene)m_scene).ExternalChecks.ExternalChecksCanBeGodLike(this.AgentId)) |
5248 | { | 5248 | { |
5249 | LLUUID invoice = messagePacket.MethodData.Invoice; | 5249 | LLUUID invoice = messagePacket.MethodData.Invoice; |
5250 | LLUUID SenderID = messagePacket.AgentData.AgentID; | 5250 | LLUUID SenderID = messagePacket.AgentData.AgentID; |