aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs47
1 files changed, 38 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 66b9f06..39ba708 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden
58 string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder, 58 string assetName, string description, UUID assetID, UUID inventoryItem, UUID parentFolder,
59 byte[] data, string inventoryType, string assetType, 59 byte[] data, string inventoryType, string assetType,
60 int cost, UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances, 60 int cost, UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances,
61 bool IsAtestUpload, ref string error); 61 bool IsAtestUpload, ref string error, ref int nextOwnerMask, ref int groupMask, ref int everyoneMask);
62 62
63 public delegate UUID UpdateItem(UUID itemID, byte[] data); 63 public delegate UUID UpdateItem(UUID itemID, byte[] data);
64 64
@@ -666,7 +666,8 @@ namespace OpenSim.Region.ClientStack.Linden
666 AssetUploader uploader = 666 AssetUploader uploader =
667 new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, 667 new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type,
668 llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile, cost, 668 llsdRequest.asset_type, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile, cost,
669 texturesFolder, nreqtextures, nreqmeshs, nreqinstances, IsAtestUpload); 669 texturesFolder, nreqtextures, nreqmeshs, nreqinstances, IsAtestUpload,
670 llsdRequest.next_owner_mask, llsdRequest.group_mask, llsdRequest.everyone_mask);
670 671
671 m_HostCapsObj.HttpListener.AddStreamHandler( 672 m_HostCapsObj.HttpListener.AddStreamHandler(
672 new BinaryStreamHandler( 673 new BinaryStreamHandler(
@@ -713,9 +714,9 @@ namespace OpenSim.Region.ClientStack.Linden
713 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, 714 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
714 string assetType, int cost, 715 string assetType, int cost,
715 UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances, 716 UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances,
716 bool IsAtestUpload, ref string error) 717 bool IsAtestUpload, ref string error,
718 ref int nextOwnerMask, ref int groupMask, ref int everyoneMask)
717 { 719 {
718
719 lock (m_ModelCost) 720 lock (m_ModelCost)
720 m_FileAgentInventoryState = FileAgentInventoryState.processUpload; 721 m_FileAgentInventoryState = FileAgentInventoryState.processUpload;
721 722
@@ -1081,7 +1082,13 @@ namespace OpenSim.Region.ClientStack.Linden
1081 { 1082 {
1082 prim.BaseMask = (uint)PermissionMask.All | (uint)PermissionMask.Export; 1083 prim.BaseMask = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1083 prim.OwnerMask = (uint)PermissionMask.All | (uint)PermissionMask.Export; 1084 prim.OwnerMask = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1084 prim.NextOwnerMask = (uint)PermissionMask.Transfer; 1085 prim.GroupMask = prim.BaseMask & (uint)groupMask;
1086 prim.EveryoneMask = prim.BaseMask & (uint)everyoneMask;
1087 prim.NextOwnerMask = prim.BaseMask & (uint)nextOwnerMask;
1088 // If the viewer gives us bogus permissions, revert to the SL
1089 // default of transfer only.
1090 if ((prim.NextOwnerMask & (uint)PermissionMask.All) == 0)
1091 prim.NextOwnerMask = (uint)PermissionMask.Transfer;
1085 } 1092 }
1086 1093
1087 if(istest) 1094 if(istest)
@@ -1191,6 +1198,7 @@ namespace OpenSim.Region.ClientStack.Linden
1191 { 1198 {
1192 item.BasePermissions = (uint)(PermissionMask.Move | PermissionMask.Modify); 1199 item.BasePermissions = (uint)(PermissionMask.Move | PermissionMask.Modify);
1193 item.CurrentPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify); 1200 item.CurrentPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify);
1201 item.GroupPermissions = 0;
1194 item.EveryOnePermissions = 0; 1202 item.EveryOnePermissions = 0;
1195 item.NextPermissions = 0; 1203 item.NextPermissions = 0;
1196 } 1204 }
@@ -1198,12 +1206,19 @@ namespace OpenSim.Region.ClientStack.Linden
1198 { 1206 {
1199 item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; 1207 item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1200 item.CurrentPermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; 1208 item.CurrentPermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export;
1201 item.EveryOnePermissions = 0; 1209 item.GroupPermissions = item.BasePermissions & (uint)groupMask;
1202 item.NextPermissions = (uint)PermissionMask.Transfer; 1210 item.EveryOnePermissions = item.BasePermissions & (uint)everyoneMask;
1211 item.NextPermissions = item.BasePermissions & (uint)nextOwnerMask;
1212 if ((item.NextPermissions & (uint)PermissionMask.All) == 0)
1213 item.NextPermissions = (uint)PermissionMask.Transfer;
1203 } 1214 }
1204 1215
1205 item.CreationDate = Util.UnixTimeSinceEpoch(); 1216 item.CreationDate = Util.UnixTimeSinceEpoch();
1206 1217
1218 everyoneMask = (int)item.EveryOnePermissions;
1219 groupMask = (int)item.GroupPermissions;
1220 nextOwnerMask = (int)item.NextPermissions;
1221
1207 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client); 1222 m_Scene.TryGetClient(m_HostCapsObj.AgentID, out client);
1208 1223
1209 if (AddNewInventoryItem != null) 1224 if (AddNewInventoryItem != null)
@@ -1592,12 +1607,17 @@ namespace OpenSim.Region.ClientStack.Linden
1592 private int m_nreqmeshs; 1607 private int m_nreqmeshs;
1593 private int m_nreqinstances; 1608 private int m_nreqinstances;
1594 private bool m_IsAtestUpload; 1609 private bool m_IsAtestUpload;
1610
1611 private int m_nextOwnerMask;
1612 private int m_groupMask;
1613 private int m_everyoneMask;
1614
1595 1615
1596 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem, 1616 public AssetUploader(string assetName, string description, UUID assetID, UUID inventoryItem,
1597 UUID parentFolderID, string invType, string assetType, string path, 1617 UUID parentFolderID, string invType, string assetType, string path,
1598 IHttpServer httpServer, bool dumpAssetsToFile, 1618 IHttpServer httpServer, bool dumpAssetsToFile,
1599 int totalCost, UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances, 1619 int totalCost, UUID texturesFolder, int nreqtextures, int nreqmeshs, int nreqinstances,
1600 bool IsAtestUpload) 1620 bool IsAtestUpload, int nextOwnerMask, int groupMask, int everyoneMask)
1601 { 1621 {
1602 m_assetName = assetName; 1622 m_assetName = assetName;
1603 m_assetDes = description; 1623 m_assetDes = description;
@@ -1621,6 +1641,10 @@ namespace OpenSim.Region.ClientStack.Linden
1621 m_timeoutTimer.Interval = 120000; 1641 m_timeoutTimer.Interval = 120000;
1622 m_timeoutTimer.AutoReset = false; 1642 m_timeoutTimer.AutoReset = false;
1623 m_timeoutTimer.Start(); 1643 m_timeoutTimer.Start();
1644
1645 m_nextOwnerMask = nextOwnerMask;
1646 m_groupMask = groupMask;
1647 m_everyoneMask = everyoneMask;
1624 } 1648 }
1625 1649
1626 /// <summary> 1650 /// <summary>
@@ -1661,8 +1685,13 @@ namespace OpenSim.Region.ClientStack.Linden
1661 { 1685 {
1662 handlerUpLoad(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data, m_invType, m_assetType, 1686 handlerUpLoad(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data, m_invType, m_assetType,
1663 m_cost, m_texturesFolder, m_nreqtextures, m_nreqmeshs, m_nreqinstances, m_IsAtestUpload, 1687 m_cost, m_texturesFolder, m_nreqtextures, m_nreqmeshs, m_nreqinstances, m_IsAtestUpload,
1664 ref m_error); 1688 ref m_error, ref m_nextOwnerMask, ref m_groupMask, ref m_everyoneMask);
1665 } 1689 }
1690
1691 uploadComplete.new_next_owner_mask = m_nextOwnerMask;
1692 uploadComplete.new_group_mask = m_groupMask;
1693 uploadComplete.new_everyone_mask = m_everyoneMask;
1694
1666 if (m_IsAtestUpload) 1695 if (m_IsAtestUpload)
1667 { 1696 {
1668 LLSDAssetUploadError resperror = new LLSDAssetUploadError(); 1697 LLSDAssetUploadError resperror = new LLSDAssetUploadError();