aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2017-05-01 14:18:59 +0100
committerUbitUmarov2017-05-01 14:18:59 +0100
commit60dc124872c52fb50cbf2f4413bd8813e50c527b (patch)
treef08a364f4e55b84fced61c54c9ac6d97ea0acbcc /OpenSim/Region/CoreModules
parentPermissions compatibility hack 1: anyone copy - new permissions require that ... (diff)
downloadopensim-SC_OLD-60dc124872c52fb50cbf2f4413bd8813e50c527b.zip
opensim-SC_OLD-60dc124872c52fb50cbf2f4413bd8813e50c527b.tar.gz
opensim-SC_OLD-60dc124872c52fb50cbf2f4413bd8813e50c527b.tar.bz2
opensim-SC_OLD-60dc124872c52fb50cbf2f4413bd8813e50c527b.tar.xz
rename sog.GetEffectivePermissions() since its use is now limited to more specific task, and no longer on current effective(full) path. Note that change ownermask start to be current ownermask, and filter it to all parts basemask
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs17
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs10
2 files changed, 10 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 916ddb0..f1885da 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -579,26 +579,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
579 IClientAPI remoteClient) 579 IClientAPI remoteClient)
580 { 580 {
581 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask); 581 uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask);
582 582
583 // For the porposes of inventory, an object is modify if the prims
584 // are modify. This allows renaming an object that contains no
585 // mod items.
586 foreach (SceneObjectGroup grp in objsForEffectivePermissions) 583 foreach (SceneObjectGroup grp in objsForEffectivePermissions)
587 { 584 {
588 uint groupPerms = grp.GetEffectivePermissions(true); 585 effectivePerms &= grp.CurrentAndFoldedNextPermissions();
589// if ((grp.RootPart.BaseMask & (uint)PermissionMask.Modify) != 0)
590// groupPerms |= (uint)PermissionMask.Modify;
591
592 effectivePerms &= groupPerms;
593 } 586 }
594 587
595 if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) 588 if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions())
596 { 589 {
590 // apply parts inventory items next owner
597 PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms); 591 PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms);
598 592 // change to next owner
599 uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; 593 uint basePerms = effectivePerms & so.RootPart.NextOwnerMask;
600 594 // fix and update folded
601 // rebuild folded perms since we don't have then on inworld objects
602 basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); 595 basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms);
603 596
604 item.BasePermissions = basePerms; 597 item.BasePermissions = basePerms;
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 6854b53..d1a109e 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -206,12 +206,12 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
206 item.InvType = (int)InventoryType.Object; 206 item.InvType = (int)InventoryType.Object;
207 item.Folder = categoryID; 207 item.Folder = categoryID;
208 208
209 perms = group.GetEffectivePermissions(false); 209 perms = group.CurrentAndFoldedNextPermissions();
210 210 // apply parts inventory next perms
211 PermissionsUtil.ApplyNoModFoldedPermissions(perms, ref perms); 211 PermissionsUtil.ApplyNoModFoldedPermissions(perms, ref perms);
212 212 // change to next owner perms
213 perms &= part.NextOwnerMask; 213 perms &= part.NextOwnerMask;
214 214 // update folded
215 perms = PermissionsUtil.FixAndFoldPermissions(perms); 215 perms = PermissionsUtil.FixAndFoldPermissions(perms);
216 216
217 item.BasePermissions = perms; 217 item.BasePermissions = perms;