When taking an object into inventory, set the inventory item's "Next Owner" permissions according to the permissions of the items in the object
parent
1fa3a6f1bd
commit
e68867c9b6
|
@ -556,6 +556,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
|
||||
if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions())
|
||||
{
|
||||
// Changing ownership, so apply the "Next Owner" permissions to all of the
|
||||
// inventory item's permissions.
|
||||
|
||||
uint perms = effectivePerms;
|
||||
PermissionsUtil.ApplyFoldedPermissions(effectivePerms, ref perms);
|
||||
|
||||
|
@ -570,6 +573,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
}
|
||||
else
|
||||
{
|
||||
// Not changing ownership.
|
||||
// In this case we apply the permissions in the object's items ONLY to the inventory
|
||||
// item's "Next Owner" permissions, but NOT to its "Current", "Base", etc. permissions.
|
||||
// E.g., if the object contains a No-Transfer item then the item's "Next Owner"
|
||||
// permissions are also No-Transfer.
|
||||
PermissionsUtil.ApplyFoldedPermissions(effectivePerms, ref allObjectsNextOwnerPerms);
|
||||
|
||||
item.BasePermissions = effectivePerms;
|
||||
item.CurrentPermissions = effectivePerms;
|
||||
item.NextPermissions = allObjectsNextOwnerPerms & effectivePerms;
|
||||
|
|
Loading…
Reference in New Issue