nore permissions masks hierachy

httptests
UbitUmarov 2017-04-29 23:59:56 +01:00
parent fedd1a93d2
commit d8341588b3
3 changed files with 18 additions and 22 deletions

View File

@ -597,10 +597,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms);
item.BasePermissions = basePerms;
item.CurrentPermissions = item.BasePermissions;
item.NextPermissions = effectivePerms & so.RootPart.NextOwnerMask;
item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask;
item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
item.CurrentPermissions = basePerms;
item.NextPermissions = basePerms & so.RootPart.NextOwnerMask;
item.EveryOnePermissions = basePerms & so.RootPart.EveryoneMask;
item.GroupPermissions = basePerms & so.RootPart.GroupMask;
// apply next owner perms on rez
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;

View File

@ -216,12 +216,10 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
item.BasePermissions = perms;
item.CurrentPermissions = perms;
perms &= part.NextOwnerMask;
item.NextPermissions = perms;
item.NextPermissions = part.NextOwnerMask & perms;
item.EveryOnePermissions = part.EveryoneMask & perms;
item.GroupPermissions = part.GroupMask & perms;
item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
item.CreationDate = Util.UnixTimeSinceEpoch();

View File

@ -1267,29 +1267,27 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: Fix this after the inventory fixer exists and has beenr run
if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
{
agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions;
uint perms = taskItem.BasePermissions & taskItem.NextPermissions;
if (taskItem.InvType == (int)InventoryType.Object)
{
uint perms = agentItem.BasePermissions;
PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms );
// perms |= (uint)PermissionMask.Move;
// agentItem.BasePermissions = perms;
agentItem.BasePermissions = PermissionsUtil.FixAndFoldPermissions(perms);
PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms );
perms = PermissionsUtil.FixAndFoldPermissions(perms);
}
else
agentItem.BasePermissions &= taskItem.CurrentPermissions;
perms &= taskItem.CurrentPermissions;
// always unlock
agentItem.BasePermissions |= (uint)PermissionMask.Move;
perms |= (uint)PermissionMask.Move;
agentItem.CurrentPermissions = agentItem.BasePermissions;
agentItem.BasePermissions = perms;
agentItem.CurrentPermissions = perms;
agentItem.NextPermissions = perms & taskItem.NextPermissions;
agentItem.EveryOnePermissions = perms & taskItem.EveryonePermissions;
// Group permissions make no sense here
agentItem.GroupPermissions = 0;
agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner);
agentItem.NextPermissions = taskItem.NextPermissions;
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
// Group permissions make no sense here
agentItem.GroupPermissions = 0;
}
else
{