aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs9
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs2
6 files changed, 40 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index cf0c28b..be699db 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden
422 string assetType) 422 string assetType)
423 { 423 {
424 m_log.DebugFormat( 424 m_log.DebugFormat(
425 "Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}", 425 "[BUNCH OF CAPS]: Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}",
426 assetID, inventoryItem, inventoryType, assetType); 426 assetID, inventoryItem, inventoryType, assetType);
427 427
428 sbyte assType = 0; 428 sbyte assType = 0;
@@ -625,7 +625,12 @@ namespace OpenSim.Region.ClientStack.Linden
625 item.AssetType = assType; 625 item.AssetType = assType;
626 item.InvType = inType; 626 item.InvType = inType;
627 item.Folder = parentFolder; 627 item.Folder = parentFolder;
628 item.CurrentPermissions = (uint)PermissionMask.All; 628
629 // If we set PermissionMask.All then when we rez the item the next permissions will replace the current
630 // (owner) permissions. This becomes a problem if next permissions are changed.
631 item.CurrentPermissions
632 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
633
629 item.BasePermissions = (uint)PermissionMask.All; 634 item.BasePermissions = (uint)PermissionMask.All;
630 item.EveryOnePermissions = 0; 635 item.EveryOnePermissions = 0;
631 item.NextPermissions = (uint)PermissionMask.All; 636 item.NextPermissions = (uint)PermissionMask.All;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
index aed03b3..1117f2a 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs
@@ -50,8 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden
50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 50 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
51 public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule 51 public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule
52 { 52 {
53// private static readonly ILog m_log = 53// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
54// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 54
56 private Scene m_scene; 55 private Scene m_scene;
57// private IAssetService m_assetService; 56// private IAssetService m_assetService;
@@ -210,6 +209,9 @@ namespace OpenSim.Region.ClientStack.Linden
210 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, 209 UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType,
211 string assetType,UUID AgentID) 210 string assetType,UUID AgentID)
212 { 211 {
212// m_log.DebugFormat(
213// "[NEW FILE AGENT INVENTORY VARIABLE PRICE MODULE]: Upload complete for {0}", inventoryItem);
214
213 sbyte assType = 0; 215 sbyte assType = 0;
214 sbyte inType = 0; 216 sbyte inType = 0;
215 217
@@ -259,13 +261,13 @@ namespace OpenSim.Region.ClientStack.Linden
259 item.AssetType = assType; 261 item.AssetType = assType;
260 item.InvType = inType; 262 item.InvType = inType;
261 item.Folder = parentFolder; 263 item.Folder = parentFolder;
262 item.CurrentPermissions = (uint)PermissionMask.All; 264 item.CurrentPermissions
265 = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer);
263 item.BasePermissions = (uint)PermissionMask.All; 266 item.BasePermissions = (uint)PermissionMask.All;
264 item.EveryOnePermissions = 0; 267 item.EveryOnePermissions = 0;
265 item.NextPermissions = (uint)PermissionMask.All; 268 item.NextPermissions = (uint)PermissionMask.All;
266 item.CreationDate = Util.UnixTimeSinceEpoch(); 269 item.CreationDate = Util.UnixTimeSinceEpoch();
267 m_scene.AddInventoryItem(item); 270 m_scene.AddInventoryItem(item);
268
269 } 271 }
270 } 272 }
271} 273}
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index e4bacd4..7a3d97e 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -339,7 +339,7 @@ namespace OpenSim.Region.ClientStack.Linden
339 m_scene.AddSceneObject(grp); 339 m_scene.AddSceneObject(grp);
340 grp.AbsolutePosition = obj.Position; 340 grp.AbsolutePosition = obj.Position;
341 } 341 }
342 342
343 allparts[i] = grp; 343 allparts[i] = grp;
344 } 344 }
345 345
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 54b422b..8b5b1a7 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -789,6 +789,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
789 { 789 {
790 group = objlist[i]; 790 group = objlist[i];
791 791
792// m_log.DebugFormat(
793// "[InventoryAccessModule]: Preparing to rez {0} {1} {2} ownermask={3:X} nextownermask={4:X} groupmask={5:X} everyonemask={6:X} for {7}",
794// group.Name, group.LocalId, group.UUID,
795// group.RootPart.OwnerMask, group.RootPart.NextOwnerMask, group.RootPart.GroupMask, group.RootPart.EveryoneMask,
796// remoteClient.Name);
797
792// Vector3 storedPosition = group.AbsolutePosition; 798// Vector3 storedPosition = group.AbsolutePosition;
793 if (group.UUID == UUID.Zero) 799 if (group.UUID == UUID.Zero)
794 { 800 {
@@ -854,9 +860,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
854 rootPart.ScheduleFullUpdate(); 860 rootPart.ScheduleFullUpdate();
855 } 861 }
856 862
857// m_log.DebugFormat( 863// m_log.DebugFormat(
858// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}", 864// "[InventoryAccessModule]: Rezzed {0} {1} {2} ownermask={3:X} nextownermask={4:X} groupmask={5:X} everyonemask={6:X} for {7}",
859// group.Name, group.LocalId, group.UUID, remoteClient.Name); 865// group.Name, group.LocalId, group.UUID,
866// group.RootPart.OwnerMask, group.RootPart.NextOwnerMask, group.RootPart.GroupMask, group.RootPart.EveryoneMask,
867// remoteClient.Name);
860 } 868 }
861 869
862 if (item != null) 870 if (item != null)
@@ -937,7 +945,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
937 } 945 }
938 946
939 rootPart.FromFolderID = item.Folder; 947 rootPart.FromFolderID = item.Folder;
940 948
949// Console.WriteLine("rootPart.OwnedID {0}, item.Owner {1}, item.CurrentPermissions {2:X}",
950// rootPart.OwnerID, item.Owner, item.CurrentPermissions);
951
941 if ((rootPart.OwnerID != item.Owner) || 952 if ((rootPart.OwnerID != item.Owner) ||
942 (item.CurrentPermissions & 16) != 0) 953 (item.CurrentPermissions & 16) != 0)
943 { 954 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index af01624..5a5307c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -347,6 +347,12 @@ namespace OpenSim.Region.Framework.Scenes
347 { 347 {
348 item.Name = itemUpd.Name; 348 item.Name = itemUpd.Name;
349 item.Description = itemUpd.Description; 349 item.Description = itemUpd.Description;
350
351// m_log.DebugFormat(
352// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}",
353// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags,
354// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions);
355
350 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) 356 if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions))
351 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; 357 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner;
352 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; 358 item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
@@ -355,6 +361,9 @@ namespace OpenSim.Region.Framework.Scenes
355 item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; 361 item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions;
356 if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) 362 if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions))
357 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; 363 item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup;
364
365// m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags);
366
358 item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; 367 item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions;
359 item.GroupID = itemUpd.GroupID; 368 item.GroupID = itemUpd.GroupID;
360 item.GroupOwned = itemUpd.GroupOwned; 369 item.GroupOwned = itemUpd.GroupOwned;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index f173c95..a73d9b6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -265,6 +265,8 @@ namespace OpenSim.Region.Framework.Scenes
265 265
266 public void ApplyNextOwnerPermissions() 266 public void ApplyNextOwnerPermissions()
267 { 267 {
268// m_log.DebugFormat("[PRIM INVENTORY]: Applying next owner permissions to {0} {1}", Name, UUID);
269
268 SceneObjectPart[] parts = m_parts.GetArray(); 270 SceneObjectPart[] parts = m_parts.GetArray();
269 for (int i = 0; i < parts.Length; i++) 271 for (int i = 0; i < parts.Length; i++)
270 parts[i].ApplyNextOwnerPermissions(); 272 parts[i].ApplyNextOwnerPermissions();