aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-04-29 23:59:56 +0100
committerUbitUmarov2017-04-29 23:59:56 +0100
commitd8341588b3b7d855c381831ddf6ca5656a6be9c3 (patch)
treefe25b79ffb8e41541eaaf004729110ef6e5beb06 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentbuysell: fix permissions masks hierachy (diff)
downloadopensim-SC-d8341588b3b7d855c381831ddf6ca5656a6be9c3.zip
opensim-SC-d8341588b3b7d855c381831ddf6ca5656a6be9c3.tar.gz
opensim-SC-d8341588b3b7d855c381831ddf6ca5656a6be9c3.tar.bz2
opensim-SC-d8341588b3b7d855c381831ddf6ca5656a6be9c3.tar.xz
nore permissions masks hierachy
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs26
1 files changed, 12 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 0549571..a2cee81 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1267,29 +1267,27 @@ 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; 1270 uint perms = taskItem.BasePermissions & taskItem.NextPermissions;
1271 if (taskItem.InvType == (int)InventoryType.Object) 1271 if (taskItem.InvType == (int)InventoryType.Object)
1272 { 1272 {
1273 uint perms = agentItem.BasePermissions; 1273 PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms );
1274 PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms ); 1274 perms = PermissionsUtil.FixAndFoldPermissions(perms);
1275// perms |= (uint)PermissionMask.Move;
1276// agentItem.BasePermissions = perms;
1277 agentItem.BasePermissions = PermissionsUtil.FixAndFoldPermissions(perms);
1278 } 1275 }
1279 else 1276 else
1280 agentItem.BasePermissions &= taskItem.CurrentPermissions; 1277 perms &= taskItem.CurrentPermissions;
1281 1278
1282 // always unlock 1279 // always unlock
1283 agentItem.BasePermissions |= (uint)PermissionMask.Move; 1280 perms |= (uint)PermissionMask.Move;
1284 1281
1285 agentItem.CurrentPermissions = agentItem.BasePermissions; 1282 agentItem.BasePermissions = perms;
1286 1283 agentItem.CurrentPermissions = perms;
1287 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 1284 agentItem.NextPermissions = perms & taskItem.NextPermissions;
1288 agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); 1285 agentItem.EveryOnePermissions = perms & taskItem.EveryonePermissions;
1289 agentItem.NextPermissions = taskItem.NextPermissions;
1290 agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
1291 // Group permissions make no sense here 1286 // Group permissions make no sense here
1292 agentItem.GroupPermissions = 0; 1287 agentItem.GroupPermissions = 0;
1288
1289 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
1290 agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner);
1293 } 1291 }
1294 else 1292 else
1295 { 1293 {