Partial permissions fix for boxed items.

avinationmerge
Melanie 2011-01-10 22:02:22 +01:00
parent 72048169c0
commit 2c6a410e90
2 changed files with 18 additions and 10 deletions

View File

@ -2171,5 +2171,15 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.LinkObjects(root, children); m_sceneGraph.LinkObjects(root, children);
} }
private string PermissionString(uint permissions)
{
PermissionMask perms = (PermissionMask)permissions &
(PermissionMask.Move |
PermissionMask.Copy |
PermissionMask.Transfer |
PermissionMask.Modify);
return perms.ToString();
}
} }
} }

View File

@ -1163,16 +1163,14 @@ namespace OpenSim.Region.Framework.Scenes
foreach (TaskInventoryItem item in m_items.Values) foreach (TaskInventoryItem item in m_items.Values)
{ {
if (item.InvType != (int)InventoryType.Object) if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
{ mask &= ~((uint)PermissionMask.Copy >> 13);
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
mask &= ~((uint)PermissionMask.Copy >> 13); mask &= ~((uint)PermissionMask.Transfer >> 13);
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0) if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0)
mask &= ~((uint)PermissionMask.Transfer >> 13); mask &= ~((uint)PermissionMask.Modify >> 13);
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0)
mask &= ~((uint)PermissionMask.Modify >> 13); if (item.InvType == (int)InventoryType.Object)
}
else
{ {
if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
mask &= ~((uint)PermissionMask.Copy >> 13); mask &= ~((uint)PermissionMask.Copy >> 13);