change taskInventory copy/move to agents inventory rules
parent
8a330bc45d
commit
94bb6d965e
|
@ -1678,7 +1678,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
private bool CanReturnObjects(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects)
|
||||
{
|
||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
|
@ -2289,23 +2288,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||
if (sog == null)
|
||||
return false;
|
||||
|
||||
uint perms = GetObjectPermissions(userID, sog, true);
|
||||
if((perms & (uint)PermissionMask.Modify) == 0)
|
||||
if(sog.OwnerID == userID || IsAdministrator(userID))
|
||||
return true;
|
||||
|
||||
if(sog.IsAttachment)
|
||||
return false;
|
||||
|
||||
UUID sogGroupID = sog.GroupID;
|
||||
|
||||
if(sogGroupID == UUID.Zero || sogGroupID != sog.OwnerID)
|
||||
return false;
|
||||
|
||||
TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID);
|
||||
if(ti == null)
|
||||
return false;
|
||||
|
||||
uint itperms = GetObjectItemPermissions(userID, ti);
|
||||
ulong powers = 0;
|
||||
if(GroupMemberPowers(sogGroupID, userID, ref powers))
|
||||
{
|
||||
if(powers == (ulong)GroupPowers.ObjectManipulate)
|
||||
return true;
|
||||
|
||||
if((itperms & (uint)PermissionMask.Copy) == 0)
|
||||
return false;
|
||||
|
||||
if(sog.OwnerID != userID && (itperms & (uint)PermissionMask.Transfer) == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
if((ti.EveryonePermissions & (uint)PermissionMask.Copy) != 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// object inventory to object inventory item drag and drop
|
||||
|
|
|
@ -1388,11 +1388,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
if (!Permissions.CanCopyObjectInventory(itemId, part.UUID, remoteClient.AgentId))
|
||||
{
|
||||
// check also if we can delete the no copy item
|
||||
if(!Permissions.CanEditObject(part.UUID, remoteClient.AgentId))
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
string message;
|
||||
InventoryItemBase item = MoveTaskInventoryItem(remoteClient, folderId, part, itemId, out message);
|
||||
|
@ -1769,7 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
itemInfo.CurrentPermissions &= currentItem.BasePermissions;
|
||||
itemInfo.NextPermissions &= currentItem.BasePermissions;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue