Partial permissions fix for boxed items.

viewer-2-initial-appearance
Melanie 2011-01-12 21:25:38 +00:00
parent dd154f7403
commit 7cfe17b5b3
2 changed files with 17 additions and 0 deletions

View File

@ -2131,5 +2131,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

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