From 60dc124872c52fb50cbf2f4413bd8813e50c527b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 1 May 2017 14:18:59 +0100 Subject: rename sog.GetEffectivePermissions() since its use is now limited to more specific task, and no longer on current effective(full) path. Note that change ownermask start to be current ownermask, and filter it to all parts basemask --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 916ddb0..f1885da 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -579,26 +579,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess IClientAPI remoteClient) { uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move | PermissionMask.Export | PermissionMask.FoldedMask); - - // For the porposes of inventory, an object is modify if the prims - // are modify. This allows renaming an object that contains no - // mod items. + foreach (SceneObjectGroup grp in objsForEffectivePermissions) { - uint groupPerms = grp.GetEffectivePermissions(true); -// if ((grp.RootPart.BaseMask & (uint)PermissionMask.Modify) != 0) -// groupPerms |= (uint)PermissionMask.Modify; - - effectivePerms &= groupPerms; + effectivePerms &= grp.CurrentAndFoldedNextPermissions(); } if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) { + // apply parts inventory items next owner PermissionsUtil.ApplyNoModFoldedPermissions(effectivePerms, ref effectivePerms); - + // change to next owner uint basePerms = effectivePerms & so.RootPart.NextOwnerMask; - - // rebuild folded perms since we don't have then on inworld objects + // fix and update folded basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); item.BasePermissions = basePerms; -- cgit v1.1