aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2017-04-29 22:09:45 +0100
committerUbitUmarov2017-04-29 22:09:45 +0100
commit522695c821c9f68d6c13533220de428f0d036dd7 (patch)
treeab368d8fba08a87a83e9c96e1257fef40871d191 /OpenSim/Region/CoreModules
parent recover PermissionsUtil.ApplyFoldedPermissions (well my version). its use ea... (diff)
downloadopensim-SC-522695c821c9f68d6c13533220de428f0d036dd7.zip
opensim-SC-522695c821c9f68d6c13533220de428f0d036dd7.tar.gz
opensim-SC-522695c821c9f68d6c13533220de428f0d036dd7.tar.bz2
opensim-SC-522695c821c9f68d6c13533220de428f0d036dd7.tar.xz
update folded permitions if taking from world, or after unfold
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs15
-rw-r--r--OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs4
2 files changed, 4 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index bce0610..d4f9c16 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -594,16 +594,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
594 uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; 594 uint basePerms = effectivePerms & so.RootPart.NextOwnerMask;
595 595
596 // rebuild folded perms since we don't have then on inworld objects 596 // rebuild folded perms since we don't have then on inworld objects
597 // possible existent ones where already unfolded 597 basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms);
598
599 if((basePerms & (uint)PermissionMask.Copy) == 0)
600 basePerms |= (uint)PermissionMask.Transfer;
601
602 // unlock
603 basePerms |= (uint)PermissionMask.Move;
604
605 basePerms &= ~(uint)PermissionMask.FoldedMask;
606 basePerms |= ((basePerms >> (int)PermissionMask.FoldingShift) & (uint)PermissionMask.FoldedMask);
607 598
608 item.BasePermissions = basePerms; 599 item.BasePermissions = basePerms;
609 item.CurrentPermissions = item.BasePermissions; 600 item.CurrentPermissions = item.BasePermissions;
@@ -1146,9 +1137,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1146 if ((item.BasePermissions & (uint)PermissionMask.FoldedMask) != 0) 1137 if ((item.BasePermissions & (uint)PermissionMask.FoldedMask) != 0)
1147 { 1138 {
1148 // We have permissions stored there so use them 1139 // We have permissions stored there so use them
1149 part.NextOwnerMask = ((item.BasePermissions & 7) << 13); 1140 part.NextOwnerMask = ((item.BasePermissions & (uint)PermissionMask.FoldedMask) << (int)PermissionMask.FoldingShift);
1150 if ((item.BasePermissions & (uint)PermissionMask.FoldedExport) != 0)
1151 part.NextOwnerMask |= (uint)PermissionMask.Export;
1152 part.NextOwnerMask |= (uint)PermissionMask.Move; 1141 part.NextOwnerMask |= (uint)PermissionMask.Move;
1153 } 1142 }
1154 else 1143 else
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
index 84f33d1..af53aa3 100644
--- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
+++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs
@@ -210,9 +210,9 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
210 210
211 PermissionsUtil.ApplyFoldedPermissions(perms, ref perms); 211 PermissionsUtil.ApplyFoldedPermissions(perms, ref perms);
212 212
213 item.BasePermissions = perms & part.NextOwnerMask; 213 perms &= part.NextOwnerMask;
214 214
215// we need to rebuild folded here 215 item.BasePermissions = PermissionsUtil.FixAndFoldPermissions(perms);
216 216
217 item.CurrentPermissions = item.BasePermissions; 217 item.CurrentPermissions = item.BasePermissions;
218 item.NextPermissions = part.NextOwnerMask; 218 item.NextPermissions = part.NextOwnerMask;