aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs8
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs6
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs11
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs31
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs3
9 files changed, 59 insertions, 19 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index a62a208..9054569 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -1329,6 +1329,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1329 rdata.writer.WriteStartElement(String.Empty, "Permissions", String.Empty); 1329 rdata.writer.WriteStartElement(String.Empty, "Permissions", String.Empty);
1330 rdata.writer.WriteAttributeString("current", String.Empty, i.CurrentPermissions.ToString("X")); 1330 rdata.writer.WriteAttributeString("current", String.Empty, i.CurrentPermissions.ToString("X"));
1331 rdata.writer.WriteAttributeString("next", String.Empty, i.NextPermissions.ToString("X")); 1331 rdata.writer.WriteAttributeString("next", String.Empty, i.NextPermissions.ToString("X"));
1332 rdata.writer.WriteAttributeString("group", String.Empty, i.GroupPermissions.ToString("X"));
1332 rdata.writer.WriteAttributeString("everyone", String.Empty, i.EveryOnePermissions.ToString("X")); 1333 rdata.writer.WriteAttributeString("everyone", String.Empty, i.EveryOnePermissions.ToString("X"));
1333 rdata.writer.WriteAttributeString("base", String.Empty, i.BasePermissions.ToString("X")); 1334 rdata.writer.WriteAttributeString("base", String.Empty, i.BasePermissions.ToString("X"));
1334 rdata.writer.WriteEndElement(); 1335 rdata.writer.WriteEndElement();
@@ -1950,6 +1951,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
1950 case "next" : 1951 case "next" :
1951 ic.NextPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); 1952 ic.NextPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
1952 break; 1953 break;
1954 case "group" :
1955 ic.GroupPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
1956 break;
1953 case "everyone" : 1957 case "everyone" :
1954 ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); 1958 ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
1955 break; 1959 break;
@@ -2061,6 +2065,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2061 ic.Item.CurrentPermissions = ic.CurrentPermissions; 2065 ic.Item.CurrentPermissions = ic.CurrentPermissions;
2062 ic.Item.EveryOnePermissions = ic.EveryOnePermissions; 2066 ic.Item.EveryOnePermissions = ic.EveryOnePermissions;
2063 ic.Item.BasePermissions = ic.BasePermissions; 2067 ic.Item.BasePermissions = ic.BasePermissions;
2068 ic.Item.GroupPermissions = ic.GroupPermissions;
2064 ic.Item.NextPermissions = ic.NextPermissions; 2069 ic.Item.NextPermissions = ic.NextPermissions;
2065 2070
2066 // If no type was specified for this item, we can attempt to 2071 // If no type was specified for this item, we can attempt to
@@ -2258,11 +2263,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2258 internal /*static*/ const uint DefaultNext = 0x82000; 2263 internal /*static*/ const uint DefaultNext = 0x82000;
2259 internal /*static*/ const uint DefaultBase = 0x7FFFFFFF; 2264 internal /*static*/ const uint DefaultBase = 0x7FFFFFFF;
2260 internal /*static*/ const uint DefaultEveryOne = 0x0; 2265 internal /*static*/ const uint DefaultEveryOne = 0x0;
2266 internal /*static*/ const uint DefaultGroup = 0x0;
2261 2267
2262 internal uint CurrentPermissions = 0x00; 2268 internal uint CurrentPermissions = 0x00;
2263 internal uint NextPermissions = 0x00; 2269 internal uint NextPermissions = 0x00;
2264 internal uint BasePermissions = 0x00; 2270 internal uint BasePermissions = 0x00;
2265 internal uint EveryOnePermissions = 0x00; 2271 internal uint EveryOnePermissions = 0x00;
2272 internal uint GroupPermissions = 0x00;
2266 2273
2267 internal XmlInventoryCollection() 2274 internal XmlInventoryCollection()
2268 { 2275 {
@@ -2286,6 +2293,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2286 CurrentPermissions = DefaultCurrent; 2293 CurrentPermissions = DefaultCurrent;
2287 NextPermissions = DefaultNext; 2294 NextPermissions = DefaultNext;
2288 BasePermissions = DefaultBase; 2295 BasePermissions = DefaultBase;
2296 GroupPermissions = DefaultGroup;
2289 EveryOnePermissions = DefaultEveryOne; 2297 EveryOnePermissions = DefaultEveryOne;
2290 } 2298 }
2291 2299
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 755dbab..efc781d 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -333,6 +333,7 @@ namespace OpenSim.Data.MySQL
333 item.InvType = (int) reader["invType"]; 333 item.InvType = (int) reader["invType"];
334 item.BasePermissions = (uint) reader["inventoryBasePermissions"]; 334 item.BasePermissions = (uint) reader["inventoryBasePermissions"];
335 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; 335 item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
336 item.GroupPermissions = (uint) reader["inventoryGroupPermissions"];
336 item.SalePrice = (int) reader["salePrice"]; 337 item.SalePrice = (int) reader["salePrice"];
337 item.SaleType = Convert.ToByte(reader["saleType"]); 338 item.SaleType = Convert.ToByte(reader["saleType"]);
338 item.CreationDate = (int) reader["creationDate"]; 339 item.CreationDate = (int) reader["creationDate"];
@@ -455,12 +456,12 @@ namespace OpenSim.Data.MySQL
455 string sql = 456 string sql =
456 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName" 457 "REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName"
457 + ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType" 458 + ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType"
458 + ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType" 459 + ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, inventoryGroupPermissions, salePrice, saleType"
459 + ", creationDate, groupID, groupOwned, flags) VALUES "; 460 + ", creationDate, groupID, groupOwned, flags) VALUES ";
460 sql += 461 sql +=
461 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription" 462 "(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription"
462 + ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID" 463 + ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID"
463 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?salePrice, ?saleType, ?creationDate" 464 + ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
464 + ", ?groupID, ?groupOwned, ?flags)"; 465 + ", ?groupID, ?groupOwned, ?flags)";
465 466
466 try 467 try
@@ -482,6 +483,7 @@ namespace OpenSim.Data.MySQL
482 result.Parameters.AddWithValue("?creatorID", item.Creator.ToString()); 483 result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
483 result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions); 484 result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
484 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions); 485 result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
486 result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions);
485 result.Parameters.AddWithValue("?salePrice", item.SalePrice); 487 result.Parameters.AddWithValue("?salePrice", item.SalePrice);
486 result.Parameters.AddWithValue("?saleType", item.SaleType); 488 result.Parameters.AddWithValue("?saleType", item.SaleType);
487 result.Parameters.AddWithValue("?creationDate", item.CreationDate); 489 result.Parameters.AddWithValue("?creationDate", item.CreationDate);
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index 25cef3f..cd96e01 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -75,6 +75,11 @@ namespace OpenSim.Framework
75 private uint _everyOnePermissions; 75 private uint _everyOnePermissions;
76 76
77 /// <summary> 77 /// <summary>
78 ///
79 /// </summary>
80 private uint _groupPermissions;
81
82 /// <summary>
78 /// The folder this item is contained in 83 /// The folder this item is contained in
79 /// </summary> 84 /// </summary>
80 private UUID _folder; 85 private UUID _folder;
@@ -190,6 +195,12 @@ namespace OpenSim.Framework
190 set { _everyOnePermissions = value; } 195 set { _everyOnePermissions = value; }
191 } 196 }
192 197
198 public uint GroupPermissions
199 {
200 get { return _groupPermissions; }
201 set { _groupPermissions = value; }
202 }
203
193 public int AssetType 204 public int AssetType
194 { 205 {
195 get { return _assetType; } 206 get { return _assetType; }
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index c6a43ec..4b3f829 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -48,6 +48,6 @@ namespace OpenSim
48 /// of the code that is too old. 48 /// of the code that is too old.
49 /// 49 ///
50 /// </value> 50 /// </value>
51 public readonly static int MajorInterfaceVersion = 0; 51 public readonly static int MajorInterfaceVersion = 1;
52 } 52 }
53} 53}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index bb43750..ea82a37 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1561,10 +1561,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1561 descend.ItemData[i].OwnerID = item.Owner; 1561 descend.ItemData[i].OwnerID = item.Owner;
1562 descend.ItemData[i].Type = (sbyte)item.AssetType; 1562 descend.ItemData[i].Type = (sbyte)item.AssetType;
1563 1563
1564 //descend.ItemData[i].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1565 descend.ItemData[i].GroupID = item.GroupID; 1564 descend.ItemData[i].GroupID = item.GroupID;
1566 descend.ItemData[i].GroupOwned = item.GroupOwned; 1565 descend.ItemData[i].GroupOwned = item.GroupOwned;
1567 descend.ItemData[i].GroupMask = 0; 1566 descend.ItemData[i].GroupMask = item.GroupPermissions;
1568 descend.ItemData[i].CreationDate = item.CreationDate; 1567 descend.ItemData[i].CreationDate = item.CreationDate;
1569 descend.ItemData[i].SalePrice = item.SalePrice; 1568 descend.ItemData[i].SalePrice = item.SalePrice;
1570 descend.ItemData[i].SaleType = item.SaleType; 1569 descend.ItemData[i].SaleType = item.SaleType;
@@ -1708,10 +1707,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1708 inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions; 1707 inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions;
1709 inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType; 1708 inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType;
1710 1709
1711 //inventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1712 inventoryReply.InventoryData[0].GroupID = item.GroupID; 1710 inventoryReply.InventoryData[0].GroupID = item.GroupID;
1713 inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned; 1711 inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned;
1714 inventoryReply.InventoryData[0].GroupMask = 0; 1712 inventoryReply.InventoryData[0].GroupMask = item.GroupPermissions;
1715 inventoryReply.InventoryData[0].Flags = item.Flags; 1713 inventoryReply.InventoryData[0].Flags = item.Flags;
1716 inventoryReply.InventoryData[0].SalePrice = item.SalePrice; 1714 inventoryReply.InventoryData[0].SalePrice = item.SalePrice;
1717 inventoryReply.InventoryData[0].SaleType = item.SaleType; 1715 inventoryReply.InventoryData[0].SaleType = item.SaleType;
@@ -1763,10 +1761,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1763 bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions; 1761 bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions;
1764 bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType; 1762 bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType;
1765 1763
1766 //bulkUpdate.ItemData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1767 bulkUpdate.ItemData[0].GroupID = item.GroupID; 1764 bulkUpdate.ItemData[0].GroupID = item.GroupID;
1768 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned; 1765 bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
1769 bulkUpdate.ItemData[0].GroupMask = 0; 1766 bulkUpdate.ItemData[0].GroupMask = item.GroupPermissions;
1770 bulkUpdate.ItemData[0].Flags = item.Flags; 1767 bulkUpdate.ItemData[0].Flags = item.Flags;
1771 bulkUpdate.ItemData[0].SalePrice = item.SalePrice; 1768 bulkUpdate.ItemData[0].SalePrice = item.SalePrice;
1772 bulkUpdate.ItemData[0].SaleType = item.SaleType; 1769 bulkUpdate.ItemData[0].SaleType = item.SaleType;
@@ -1811,10 +1808,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1811 InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions; 1808 InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions;
1812 InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType; 1809 InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType;
1813 1810
1814 //InventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
1815 InventoryReply.InventoryData[0].GroupID = Item.GroupID; 1811 InventoryReply.InventoryData[0].GroupID = Item.GroupID;
1816 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned; 1812 InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
1817 InventoryReply.InventoryData[0].GroupMask = 0; 1813 InventoryReply.InventoryData[0].GroupMask = Item.GroupPermissions;
1818 InventoryReply.InventoryData[0].Flags = Item.Flags; 1814 InventoryReply.InventoryData[0].Flags = Item.Flags;
1819 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice; 1815 InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
1820 InventoryReply.InventoryData[0].SaleType = Item.SaleType; 1816 InventoryReply.InventoryData[0].SaleType = Item.SaleType;
@@ -5213,6 +5209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5213 itemUpd.Description = Util.FieldToString(update.InventoryData[i].Description); 5209 itemUpd.Description = Util.FieldToString(update.InventoryData[i].Description);
5214 itemUpd.GroupID = update.InventoryData[i].GroupID; 5210 itemUpd.GroupID = update.InventoryData[i].GroupID;
5215 itemUpd.GroupOwned = update.InventoryData[i].GroupOwned; 5211 itemUpd.GroupOwned = update.InventoryData[i].GroupOwned;
5212 itemUpd.GroupPermissions = update.InventoryData[i].GroupMask;
5216 itemUpd.NextPermissions = update.InventoryData[i].NextOwnerMask; 5213 itemUpd.NextPermissions = update.InventoryData[i].NextOwnerMask;
5217 itemUpd.EveryOnePermissions = update.InventoryData[i].EveryoneMask; 5214 itemUpd.EveryOnePermissions = update.InventoryData[i].EveryoneMask;
5218 itemUpd.CreationDate = update.InventoryData[i].CreationDate; 5215 itemUpd.CreationDate = update.InventoryData[i].CreationDate;
@@ -5419,6 +5416,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5419 item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask; 5416 item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
5420 item.EveryOnePermissions = rezScriptx.InventoryBlock.EveryoneMask; 5417 item.EveryOnePermissions = rezScriptx.InventoryBlock.EveryoneMask;
5421 item.NextPermissions = rezScriptx.InventoryBlock.NextOwnerMask; 5418 item.NextPermissions = rezScriptx.InventoryBlock.NextOwnerMask;
5419 item.GroupPermissions = rezScriptx.InventoryBlock.GroupMask;
5422 item.GroupOwned = rezScriptx.InventoryBlock.GroupOwned; 5420 item.GroupOwned = rezScriptx.InventoryBlock.GroupOwned;
5423 item.GroupID = rezScriptx.InventoryBlock.GroupID; 5421 item.GroupID = rezScriptx.InventoryBlock.GroupID;
5424 item.AssetType = rezScriptx.InventoryBlock.Type; 5422 item.AssetType = rezScriptx.InventoryBlock.Type;
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
index 2bac3c7..05b7fa3 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -293,6 +293,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
293 item.Folder = InventFolder; 293 item.Folder = InventFolder;
294 item.BasePermissions = 0x7fffffff; 294 item.BasePermissions = 0x7fffffff;
295 item.CurrentPermissions = 0x7fffffff; 295 item.CurrentPermissions = 0x7fffffff;
296 item.GroupPermissions=0;
296 item.EveryOnePermissions=0; 297 item.EveryOnePermissions=0;
297 item.NextPermissions = nextPerm; 298 item.NextPermissions = nextPerm;
298 item.Flags = (uint) wearableType; 299 item.Flags = (uint) wearableType;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 2c0c872..74392cc 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -355,11 +355,11 @@ namespace OpenSim.Region.Environment.Scenes
355 item.NextPermissions = itemUpd.NextPermissions; 355 item.NextPermissions = itemUpd.NextPermissions;
356 item.CurrentPermissions |= 8; // Slam! 356 item.CurrentPermissions |= 8; // Slam!
357 item.EveryOnePermissions = itemUpd.EveryOnePermissions; 357 item.EveryOnePermissions = itemUpd.EveryOnePermissions;
358 item.GroupPermissions = itemUpd.GroupPermissions;
358 359
359 // TODO: Requires sanity checks 360 item.GroupID = itemUpd.GroupID;
360 //item.GroupID = itemUpd.GroupID; 361 item.GroupOwned = itemUpd.GroupOwned;
361 //item.GroupOwned = itemUpd.GroupOwned; 362 item.CreationDate = itemUpd.CreationDate;
362 //item.CreationDate = itemUpd.CreationDate;
363 // The client sends zero if its newly created? 363 // The client sends zero if its newly created?
364 364
365 if (itemUpd.CreationDate == 0) 365 if (itemUpd.CreationDate == 0)
@@ -480,12 +480,14 @@ namespace OpenSim.Region.Environment.Scenes
480 480
481 itemCopy.NextPermissions = item.NextPermissions; 481 itemCopy.NextPermissions = item.NextPermissions;
482 itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; 482 itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
483 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
483 } 484 }
484 else 485 else
485 { 486 {
486 itemCopy.CurrentPermissions = item.CurrentPermissions; 487 itemCopy.CurrentPermissions = item.CurrentPermissions;
487 itemCopy.NextPermissions = item.NextPermissions; 488 itemCopy.NextPermissions = item.NextPermissions;
488 itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions; 489 itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
490 itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
489 itemCopy.BasePermissions = item.BasePermissions; 491 itemCopy.BasePermissions = item.BasePermissions;
490 } 492 }
491 itemCopy.GroupID = UUID.Zero; 493 itemCopy.GroupID = UUID.Zero;
@@ -584,13 +586,13 @@ namespace OpenSim.Region.Environment.Scenes
584 { 586 {
585 CreateNewInventoryItem( 587 CreateNewInventoryItem(
586 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 588 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
587 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, Util.UnixTimeSinceEpoch()); 589 item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
588 } 590 }
589 else 591 else
590 { 592 {
591 CreateNewInventoryItem( 593 CreateNewInventoryItem(
592 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType, 594 remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
593 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, Util.UnixTimeSinceEpoch()); 595 item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
594 } 596 }
595 } 597 }
596 else 598 else
@@ -690,7 +692,7 @@ namespace OpenSim.Region.Environment.Scenes
690 { 692 {
691 CreateNewInventoryItem( 693 CreateNewInventoryItem(
692 remoteClient, folderID, name, flags, callbackID, asset, invType, 694 remoteClient, folderID, name, flags, callbackID, asset, invType,
693 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, creationDate); 695 (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
694 } 696 }
695 697
696 /// <summary> 698 /// <summary>
@@ -705,7 +707,7 @@ namespace OpenSim.Region.Environment.Scenes
705 /// <param name="creationDate"></param> 707 /// <param name="creationDate"></param>
706 private void CreateNewInventoryItem( 708 private void CreateNewInventoryItem(
707 IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType, 709 IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
708 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate) 710 uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
709 { 711 {
710 CachedUserInfo userInfo 712 CachedUserInfo userInfo
711 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 713 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -726,6 +728,7 @@ namespace OpenSim.Region.Environment.Scenes
726 item.CurrentPermissions = currentMask; 728 item.CurrentPermissions = currentMask;
727 item.NextPermissions = nextOwnerMask; 729 item.NextPermissions = nextOwnerMask;
728 item.EveryOnePermissions = everyoneMask; 730 item.EveryOnePermissions = everyoneMask;
731 item.GroupPermissions = groupMask;
729 item.BasePermissions = baseMask; 732 item.BasePermissions = baseMask;
730 item.CreationDate = creationDate; 733 item.CreationDate = creationDate;
731 734
@@ -978,6 +981,7 @@ namespace OpenSim.Region.Environment.Scenes
978 agentItem.CurrentPermissions = taskItem.NextPermissions | 8; 981 agentItem.CurrentPermissions = taskItem.NextPermissions | 8;
979 agentItem.NextPermissions = taskItem.NextPermissions; 982 agentItem.NextPermissions = taskItem.NextPermissions;
980 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; 983 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
984 agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
981 } 985 }
982 else 986 else
983 { 987 {
@@ -985,6 +989,7 @@ namespace OpenSim.Region.Environment.Scenes
985 agentItem.CurrentPermissions = taskItem.CurrentPermissions; 989 agentItem.CurrentPermissions = taskItem.CurrentPermissions;
986 agentItem.NextPermissions = taskItem.NextPermissions; 990 agentItem.NextPermissions = taskItem.NextPermissions;
987 agentItem.EveryOnePermissions = taskItem.EveryonePermissions; 991 agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
992 agentItem.GroupPermissions = taskItem.GroupPermissions;
988 } 993 }
989 994
990 if (!ExternalChecks.ExternalChecksBypassPermissions()) 995 if (!ExternalChecks.ExternalChecksBypassPermissions())
@@ -1416,6 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes
1416 taskItem.BasePermissions = itemBase.BasePermissions; 1421 taskItem.BasePermissions = itemBase.BasePermissions;
1417 taskItem.CurrentPermissions = itemBase.CurrentPermissions; 1422 taskItem.CurrentPermissions = itemBase.CurrentPermissions;
1418 taskItem.EveryonePermissions = itemBase.EveryOnePermissions; 1423 taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
1424 taskItem.GroupPermissions = itemBase.GroupPermissions;
1419 taskItem.NextPermissions = itemBase.NextPermissions; 1425 taskItem.NextPermissions = itemBase.NextPermissions;
1420 taskItem.GroupID = itemBase.GroupID; 1426 taskItem.GroupID = itemBase.GroupID;
1421 taskItem.GroupPermissions = 0; 1427 taskItem.GroupPermissions = 0;
@@ -1728,6 +1734,7 @@ namespace OpenSim.Region.Environment.Scenes
1728 item.CurrentPermissions = item.BasePermissions; 1734 item.CurrentPermissions = item.BasePermissions;
1729 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1735 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1730 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; 1736 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
1737 item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask;
1731 item.CurrentPermissions |= 8; // Slam! 1738 item.CurrentPermissions |= 8; // Slam!
1732 } 1739 }
1733 else 1740 else
@@ -1736,6 +1743,7 @@ namespace OpenSim.Region.Environment.Scenes
1736 item.CurrentPermissions = objectGroup.GetEffectivePermissions(); 1743 item.CurrentPermissions = objectGroup.GetEffectivePermissions();
1737 item.NextPermissions = objectGroup.RootPart.NextOwnerMask; 1744 item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
1738 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; 1745 item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
1746 item.GroupPermissions = objectGroup.RootPart.GroupMask;
1739 } 1747 }
1740 1748
1741 // TODO: add the new fields (Flags, Sale info, etc) 1749 // TODO: add the new fields (Flags, Sale info, etc)
@@ -1876,6 +1884,7 @@ namespace OpenSim.Region.Environment.Scenes
1876 item.CurrentPermissions = grp.RootPart.NextOwnerMask; 1884 item.CurrentPermissions = grp.RootPart.NextOwnerMask;
1877 item.NextPermissions = grp.RootPart.NextOwnerMask; 1885 item.NextPermissions = grp.RootPart.NextOwnerMask;
1878 item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask; 1886 item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
1887 item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
1879 } 1888 }
1880 else 1889 else
1881 { 1890 {
@@ -1883,6 +1892,7 @@ namespace OpenSim.Region.Environment.Scenes
1883 item.CurrentPermissions = grp.RootPart.OwnerMask; 1892 item.CurrentPermissions = grp.RootPart.OwnerMask;
1884 item.NextPermissions = grp.RootPart.NextOwnerMask; 1893 item.NextPermissions = grp.RootPart.NextOwnerMask;
1885 item.EveryOnePermissions = grp.RootPart.EveryoneMask; 1894 item.EveryOnePermissions = grp.RootPart.EveryoneMask;
1895 item.GroupPermissions = grp.RootPart.GroupMask;
1886 } 1896 }
1887 item.CreationDate = Util.UnixTimeSinceEpoch(); 1897 item.CreationDate = Util.UnixTimeSinceEpoch();
1888 1898
@@ -2041,6 +2051,7 @@ namespace OpenSim.Region.Environment.Scenes
2041 { 2051 {
2042 part.EveryoneMask = item.EveryOnePermissions; 2052 part.EveryoneMask = item.EveryOnePermissions;
2043 part.NextOwnerMask = item.NextPermissions; 2053 part.NextOwnerMask = item.NextPermissions;
2054 part.GroupMask = 0; // DO NOT propagate here
2044 } 2055 }
2045 } 2056 }
2046 group.ApplyNextOwnerPermissions(); 2057 group.ApplyNextOwnerPermissions();
@@ -2059,6 +2070,8 @@ namespace OpenSim.Region.Environment.Scenes
2059 { 2070 {
2060 part.EveryoneMask = item.EveryOnePermissions; 2071 part.EveryoneMask = item.EveryOnePermissions;
2061 part.NextOwnerMask = item.NextPermissions; 2072 part.NextOwnerMask = item.NextPermissions;
2073
2074 part.GroupMask = 0; // DO NOT propagate here
2062 } 2075 }
2063 } 2076 }
2064 2077
@@ -2282,6 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes
2282 item.CurrentPermissions = item.BasePermissions; 2295 item.CurrentPermissions = item.BasePermissions;
2283 item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask; 2296 item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
2284 item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask & returnobjects[i].RootPart.NextOwnerMask; 2297 item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask & returnobjects[i].RootPart.NextOwnerMask;
2298 item.GroupPermissions = returnobjects[i].RootPart.GroupMask & returnobjects[i].RootPart.NextOwnerMask;
2285 item.CurrentPermissions |= 8; // Slam! 2299 item.CurrentPermissions |= 8; // Slam!
2286 } 2300 }
2287 else 2301 else
@@ -2290,6 +2304,7 @@ namespace OpenSim.Region.Environment.Scenes
2290 item.CurrentPermissions = returnobjects[i].GetEffectivePermissions(); 2304 item.CurrentPermissions = returnobjects[i].GetEffectivePermissions();
2291 item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask; 2305 item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
2292 item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask; 2306 item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask;
2307 item.GroupPermissions = returnobjects[i].RootPart.GroupMask;
2293 } 2308 }
2294 2309
2295 // TODO: add the new fields (Flags, Sale info, etc) 2310 // TODO: add the new fields (Flags, Sale info, etc)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5550140..71acc9f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -4301,6 +4301,8 @@ namespace OpenSim.Region.Environment.Scenes
4301 item.NextPermissions = part.NextOwnerMask; 4301 item.NextPermissions = part.NextOwnerMask;
4302 item.EveryOnePermissions = part.EveryoneMask & 4302 item.EveryOnePermissions = part.EveryoneMask &
4303 part.NextOwnerMask; 4303 part.NextOwnerMask;
4304 item.GroupPermissions = part.GroupMask &
4305 part.NextOwnerMask;
4304 item.CurrentPermissions |= 8; // Slam! 4306 item.CurrentPermissions |= 8; // Slam!
4305 item.CreationDate = Util.UnixTimeSinceEpoch(); 4307 item.CreationDate = Util.UnixTimeSinceEpoch();
4306 4308
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 225f7cf..442720a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -166,6 +166,8 @@ namespace OpenSim.Region.Environment.Scenes
166 item.NextPermissions; 166 item.NextPermissions;
167 taskItem.EveryonePermissions = item.EveryOnePermissions & 167 taskItem.EveryonePermissions = item.EveryOnePermissions &
168 item.NextPermissions; 168 item.NextPermissions;
169 taskItem.GroupPermissions = item.GroupPermissions &
170 item.NextPermissions;
169 taskItem.NextPermissions = item.NextPermissions; 171 taskItem.NextPermissions = item.NextPermissions;
170 taskItem.CurrentPermissions |= 8; 172 taskItem.CurrentPermissions |= 8;
171 } else { 173 } else {
@@ -173,6 +175,7 @@ namespace OpenSim.Region.Environment.Scenes
173 taskItem.CurrentPermissions = item.CurrentPermissions; 175 taskItem.CurrentPermissions = item.CurrentPermissions;
174 taskItem.CurrentPermissions |= 8; 176 taskItem.CurrentPermissions |= 8;
175 taskItem.EveryonePermissions = item.EveryOnePermissions; 177 taskItem.EveryonePermissions = item.EveryOnePermissions;
178 taskItem.GroupPermissions = item.GroupPermissions;
176 taskItem.NextPermissions = item.NextPermissions; 179 taskItem.NextPermissions = item.NextPermissions;
177 } 180 }
178 181