mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Prevent group deeded objects from being returned by the group return option
unless the user has that permission through the group.
This commit is contained in:
@@ -1551,8 +1551,28 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (uint)ObjectReturnType.Group:
|
case (uint)ObjectReturnType.Group:
|
||||||
if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
|
if (parcel.landData.OwnerID != client.AgentId)
|
||||||
return true;
|
{
|
||||||
|
// If permissionis granted through a group...
|
||||||
|
//
|
||||||
|
if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
|
||||||
|
{
|
||||||
|
foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
|
||||||
|
{
|
||||||
|
// check for and remove group owned objects unless
|
||||||
|
// the user also has permissions to return those
|
||||||
|
//
|
||||||
|
if (g.OwnerID == g.GroupID &&
|
||||||
|
((powers & (long)GroupPowers.ReturnGroupOwned) == 0))
|
||||||
|
{
|
||||||
|
retlist.Remove(g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// And allow the operation
|
||||||
|
//
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case (uint)ObjectReturnType.Other:
|
case (uint)ObjectReturnType.Other:
|
||||||
if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)
|
if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user