aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-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
3 files changed, 28 insertions, 8 deletions
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