aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-04-30 19:44:49 +0100
committerUbitUmarov2017-04-30 19:44:49 +0100
commit2dbf96593cf216595a1528afa2a668c0f38e1791 (patch)
tree33c31903ceef625e046da410a3b2da97424f0a0e
parenthaving the file open then let PermissionsToString know about Export (diff)
downloadopensim-SC-2dbf96593cf216595a1528afa2a668c0f38e1791.zip
opensim-SC-2dbf96593cf216595a1528afa2a668c0f38e1791.tar.gz
opensim-SC-2dbf96593cf216595a1528afa2a668c0f38e1791.tar.bz2
opensim-SC-2dbf96593cf216595a1528afa2a668c0f38e1791.tar.xz
Permissions compatibility hack 1: anyone copy - new permissions require that all items in all object parts contents have anyone copy set. Old code only required it on object. This hack tries to allow objects older than today to still work as before on this. (this is a test, we may need to change it)
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 42f47b5..66c9013 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -338,6 +338,8 @@ namespace OpenSim.Region.Framework.Scenes
338 uint rootEveryonePerms = RootPart.EveryoneMask; 338 uint rootEveryonePerms = RootPart.EveryoneMask;
339 uint everyone = rootEveryonePerms; 339 uint everyone = rootEveryonePerms;
340 340
341 // date is time of writing april 30th 2017
342 bool newObject = (RootPart.CreationDate == 0 || RootPart.CreationDate > 1493574994);
341 SceneObjectPart[] parts = m_parts.GetArray(); 343 SceneObjectPart[] parts = m_parts.GetArray();
342 for (int i = 0; i < parts.Length; i++) 344 for (int i = 0; i < parts.Length; i++)
343 { 345 {
@@ -345,7 +347,8 @@ namespace OpenSim.Region.Framework.Scenes
345 part.AggregateInnerPerms(); 347 part.AggregateInnerPerms();
346 owner &= part.AggregatedInnerOwnerPerms; 348 owner &= part.AggregatedInnerOwnerPerms;
347 group &= part.AggregatedInnerGroupPerms; 349 group &= part.AggregatedInnerGroupPerms;
348 everyone &= part.AggregatedInnerEveryonePerms; 350 if(newObject)
351 everyone &= part.AggregatedInnerEveryonePerms;
349 } 352 }
350 // recover modify and move 353 // recover modify and move
351 rootOwnerPerms &= movemodmask; 354 rootOwnerPerms &= movemodmask;
@@ -407,14 +410,16 @@ namespace OpenSim.Region.Framework.Scenes
407 uint everyone = rootEveryonePerms; 410 uint everyone = rootEveryonePerms;
408 411
409 bool needUpdate = false; 412 bool needUpdate = false;
410 413 // date is time of writing april 30th 2017
414 bool newObject = (RootPart.CreationDate == 0 || RootPart.CreationDate > 1493574994);
411 SceneObjectPart[] parts = m_parts.GetArray(); 415 SceneObjectPart[] parts = m_parts.GetArray();
412 for (int i = 0; i < parts.Length; i++) 416 for (int i = 0; i < parts.Length; i++)
413 { 417 {
414 SceneObjectPart part = parts[i]; 418 SceneObjectPart part = parts[i];
415 owner &= part.AggregatedInnerOwnerPerms; 419 owner &= part.AggregatedInnerOwnerPerms;
416 group &= part.AggregatedInnerGroupPerms; 420 group &= part.AggregatedInnerGroupPerms;
417 everyone &= part.AggregatedInnerEveryonePerms; 421 if(newObject)
422 everyone &= part.AggregatedInnerEveryonePerms;
418 } 423 }
419 // recover modify and move 424 // recover modify and move
420 rootOwnerPerms &= movemodmask; 425 rootOwnerPerms &= movemodmask;