aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-22 22:33:00 +0000
committerMelanie Thielker2008-09-22 22:33:00 +0000
commit48672c7fd601ca2462ea91c4c09928c3a668e640 (patch)
tree33c9989e79250ba81ece613d541408fd4cb2c633 /OpenSim/Region/ClientStack
parent* Remove some old libsecondlife workarounds as suggested by jhurliman in http... (diff)
downloadopensim-SC-48672c7fd601ca2462ea91c4c09928c3a668e640.zip
opensim-SC-48672c7fd601ca2462ea91c4c09928c3a668e640.tar.gz
opensim-SC-48672c7fd601ca2462ea91c4c09928c3a668e640.tar.bz2
opensim-SC-48672c7fd601ca2462ea91c4c09928c3a668e640.tar.xz
Move script and notecard open perms checks from ClientView to the
perms module
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs24
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index c649493..6915b3a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4835,6 +4835,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4835 case PacketType.TransferRequest: 4835 case PacketType.TransferRequest:
4836 //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); 4836 //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
4837 TransferRequestPacket transfer = (TransferRequestPacket)Pack; 4837 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
4838System.Console.WriteLine("Transfer request, source {0}", transfer.TransferInfo.SourceType);
4838 // Validate inventory transfers 4839 // Validate inventory transfers
4839 // Has to be done here, because AssetCache can't do it 4840 // Has to be done here, because AssetCache can't do it
4840 // 4841 //
@@ -4890,8 +4891,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4890 return; 4891 return;
4891 } 4892 }
4892 4893
4893 if ((assetRequestItem.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) 4894 // At this point, we need to apply perms
4894 break; 4895 // only to notecards and scripts. All
4896 // other asset types are always available
4897 //
4898 if (assetRequestItem.AssetType == 10)
4899 {
4900 if (!((Scene)m_scene).ExternalChecks.ExternalChecksCanViewScript(itemID, UUID.Zero, AgentId))
4901 {
4902 SendAgentAlertMessage("Insufficient permissions to view script", false);
4903 break;
4904 }
4905 }
4906 else if (assetRequestItem.AssetType == 7)
4907 {
4908 if (!((Scene)m_scene).ExternalChecks.ExternalChecksCanViewNotecard(itemID, UUID.Zero, AgentId))
4909 {
4910 SendAgentAlertMessage("Insufficient permissions to view notecard", false);
4911 break;
4912 }
4913 }
4914
4895 if (assetRequestItem.AssetID != requestID) 4915 if (assetRequestItem.AssetID != requestID)
4896 break; 4916 break;
4897 } 4917 }