aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-04-29 19:07:04 +0100
committerUbitUmarov2017-04-29 19:07:04 +0100
commit04117d9f75ca278a921be9ce09c8c859f81cd428 (patch)
tree3a919f3e3d2eb3c0ea22bcb7fefa9fdd5e0541e0 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentadd check for valid folded perms (diff)
downloadopensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.zip
opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.gz
opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.bz2
opensim-SC-04117d9f75ca278a921be9ce09c8c859f81cd428.tar.xz
recover PermissionsUtil.ApplyFoldedPermissions (well my version). its use easys code readability
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index a6f6aa3..5e19a8a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1267,17 +1267,19 @@ namespace OpenSim.Region.Framework.Scenes
1267 // TODO: Fix this after the inventory fixer exists and has beenr run 1267 // TODO: Fix this after the inventory fixer exists and has beenr run
1268 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) 1268 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
1269 { 1269 {
1270 agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); 1270 agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions;
1271 if (taskItem.InvType == (int)InventoryType.Object) 1271 if (taskItem.InvType == (int)InventoryType.Object)
1272 { 1272 {
1273 if((taskItem.CurrentPermissions & (uint)PermissionMask.FoldedMask) != 0) 1273 uint perms = agentItem.BasePermissions;
1274 agentItem.BasePermissions &= 1274 PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms );
1275 (((taskItem.CurrentPermissions & (uint)PermissionMask.FoldedMask ) << (int)PermissionMask.FoldingShift) | 1275 agentItem.BasePermissions = perms;
1276 (taskItem.CurrentPermissions & (uint)PermissionMask.Move));
1277 } 1276 }
1278 else 1277 else
1279 agentItem.BasePermissions &= taskItem.CurrentPermissions; 1278 agentItem.BasePermissions &= taskItem.CurrentPermissions;
1280 1279
1280 // always unlock
1281 agentItem.BasePermissions |= (uint)PermissionMask.Move;
1282
1281 agentItem.CurrentPermissions = agentItem.BasePermissions; 1283 agentItem.CurrentPermissions = agentItem.BasePermissions;
1282 1284
1283 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 1285 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;