diff options
author | Diva Canto | 2016-06-20 10:08:15 -0700 |
---|---|---|
committer | Diva Canto | 2016-06-20 10:08:15 -0700 |
commit | 359908fa88c4f9188746e87350701750478fbf2f (patch) | |
tree | e15d62226bb52b8cdaf92eb9847ca008bef68f1e /OpenSim/Region/CoreModules/World/Objects | |
parent | Mantis #7929: objects deeded to the group were loosing some important propert... (diff) | |
download | opensim-SC_OLD-359908fa88c4f9188746e87350701750478fbf2f.zip opensim-SC_OLD-359908fa88c4f9188746e87350701750478fbf2f.tar.gz opensim-SC_OLD-359908fa88c4f9188746e87350701750478fbf2f.tar.bz2 opensim-SC_OLD-359908fa88c4f9188746e87350701750478fbf2f.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Objects')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 0e0f05f..42141e4 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -45,8 +45,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BuySellModule")] | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BuySellModule")] |
46 | public class BuySellModule : IBuySellModule, INonSharedRegionModule | 46 | public class BuySellModule : IBuySellModule, INonSharedRegionModule |
47 | { | 47 | { |
48 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | protected Scene m_scene = null; | 50 | protected Scene m_scene = null; |
51 | protected IDialogModule m_dialogModule; | 51 | protected IDialogModule m_dialogModule; |
52 | 52 | ||
@@ -92,9 +92,19 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
92 | if (part.ParentGroup.IsDeleted) | 92 | if (part.ParentGroup.IsDeleted) |
93 | return; | 93 | return; |
94 | 94 | ||
95 | if (part.OwnerID != client.AgentId && (!m_scene.Permissions.IsGod(client.AgentId))) | 95 | if (part.OwnerID != part.GroupID && part.OwnerID != client.AgentId && (!m_scene.Permissions.IsGod(client.AgentId))) |
96 | return; | 96 | return; |
97 | 97 | ||
98 | if (part.OwnerID == part.GroupID) // Group owned | ||
99 | { | ||
100 | // Does the user have the power to put the object on sale? | ||
101 | if (!m_scene.Permissions.CanSellGroupObject(client.AgentId, part.GroupID, m_scene)) | ||
102 | { | ||
103 | client.SendAgentAlertMessage("You don't have permission to set group-owned objects on sale", false); | ||
104 | return; | ||
105 | } | ||
106 | } | ||
107 | |||
98 | part = part.ParentGroup.RootPart; | 108 | part = part.ParentGroup.RootPart; |
99 | 109 | ||
100 | part.ObjectSaleType = saleType; | 110 | part.ObjectSaleType = saleType; |