mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Related to mantis #7929: "For sale" was not being accepted, because of permissions fail. This adds a new permissions check CanSellGroupObject. THIRD-PARTY PERMISSIONS MODULES TAKE NOTE OF THIS NEW EVENT.
This commit is contained in:
@@ -45,8 +45,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BuySellModule")]
|
||||
public class BuySellModule : IBuySellModule, INonSharedRegionModule
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected Scene m_scene = null;
|
||||
protected IDialogModule m_dialogModule;
|
||||
|
||||
@@ -92,9 +92,19 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
|
||||
if (part.ParentGroup.IsDeleted)
|
||||
return;
|
||||
|
||||
if (part.OwnerID != client.AgentId && (!m_scene.Permissions.IsGod(client.AgentId)))
|
||||
if (part.OwnerID != part.GroupID && part.OwnerID != client.AgentId && (!m_scene.Permissions.IsGod(client.AgentId)))
|
||||
return;
|
||||
|
||||
if (part.OwnerID == part.GroupID) // Group owned
|
||||
{
|
||||
// Does the user have the power to put the object on sale?
|
||||
if (!m_scene.Permissions.CanSellGroupObject(client.AgentId, part.GroupID, m_scene))
|
||||
{
|
||||
client.SendAgentAlertMessage("You don't have permission to set group-owned objects on sale", false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
part = part.ParentGroup.RootPart;
|
||||
|
||||
part.ObjectSaleType = saleType;
|
||||
|
||||
Reference in New Issue
Block a user