diff options
author | UbitUmarov | 2018-07-14 16:36:41 +0100 |
---|---|---|
committer | UbitUmarov | 2018-07-14 16:36:41 +0100 |
commit | a4881797b978b0ab73035ef6f9fc10ae897b08cc (patch) | |
tree | d1b297456e2508893fcc377ec717cde3a98834b5 | |
parent | recover lost null check in last commit (diff) | |
download | opensim-SC-a4881797b978b0ab73035ef6f9fc10ae897b08cc.zip opensim-SC-a4881797b978b0ab73035ef6f9fc10ae897b08cc.tar.gz opensim-SC-a4881797b978b0ab73035ef6f9fc10ae897b08cc.tar.bz2 opensim-SC-a4881797b978b0ab73035ef6f9fc10ae897b08cc.tar.xz |
add options for regions to ignore age < 18 and payment access control where they don't apply
-rw-r--r-- | OpenSim/Framework/EstateSettings.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 9 |
2 files changed, 14 insertions, 6 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 8212163..1b5ebfa 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -224,7 +224,6 @@ namespace OpenSim.Framework | |||
224 | } | 224 | } |
225 | 225 | ||
226 | private UUID m_EstateOwner = UUID.Zero; | 226 | private UUID m_EstateOwner = UUID.Zero; |
227 | |||
228 | public UUID EstateOwner | 227 | public UUID EstateOwner |
229 | { | 228 | { |
230 | get { return m_EstateOwner; } | 229 | get { return m_EstateOwner; } |
@@ -232,7 +231,6 @@ namespace OpenSim.Framework | |||
232 | } | 231 | } |
233 | 232 | ||
234 | private bool m_DenyMinors = false; | 233 | private bool m_DenyMinors = false; |
235 | |||
236 | public bool DenyMinors | 234 | public bool DenyMinors |
237 | { | 235 | { |
238 | get { return m_DenyMinors; } | 236 | get { return m_DenyMinors; } |
@@ -258,7 +256,6 @@ namespace OpenSim.Framework | |||
258 | } | 256 | } |
259 | 257 | ||
260 | private List<UUID> l_EstateAccess = new List<UUID>(); | 258 | private List<UUID> l_EstateAccess = new List<UUID>(); |
261 | |||
262 | public UUID[] EstateAccess | 259 | public UUID[] EstateAccess |
263 | { | 260 | { |
264 | get { return l_EstateAccess.ToArray(); } | 261 | get { return l_EstateAccess.ToArray(); } |
@@ -266,13 +263,15 @@ namespace OpenSim.Framework | |||
266 | } | 263 | } |
267 | 264 | ||
268 | private List<UUID> l_EstateGroups = new List<UUID>(); | 265 | private List<UUID> l_EstateGroups = new List<UUID>(); |
269 | |||
270 | public UUID[] EstateGroups | 266 | public UUID[] EstateGroups |
271 | { | 267 | { |
272 | get { return l_EstateGroups.ToArray(); } | 268 | get { return l_EstateGroups.ToArray(); } |
273 | set { l_EstateGroups = new List<UUID>(value); } | 269 | set { l_EstateGroups = new List<UUID>(value); } |
274 | } | 270 | } |
275 | 271 | ||
272 | public bool DoDenyMinors = true; | ||
273 | public bool DoDenyAnonymous = true; | ||
274 | |||
276 | public EstateSettings() | 275 | public EstateSettings() |
277 | { | 276 | { |
278 | } | 277 | } |
@@ -380,14 +379,14 @@ namespace OpenSim.Framework | |||
380 | 379 | ||
381 | if (!HasAccess(avatarID)) | 380 | if (!HasAccess(avatarID)) |
382 | { | 381 | { |
383 | if (DenyMinors) | 382 | if (DoDenyMinors && DenyMinors) |
384 | { | 383 | { |
385 | if ((userFlags & 32) == 0) | 384 | if ((userFlags & 32) == 0) |
386 | { | 385 | { |
387 | return true; | 386 | return true; |
388 | } | 387 | } |
389 | } | 388 | } |
390 | if (DenyAnonymous) | 389 | if (DoDenyAnonymous && DenyAnonymous) |
391 | { | 390 | { |
392 | if ((userFlags & 4) == 0) | 391 | if ((userFlags & 4) == 0) |
393 | { | 392 | { |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index b7fb52e..95fc741 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -64,6 +64,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
64 | /// If false, region restart requests from the client are blocked even if they are otherwise legitimate. | 64 | /// If false, region restart requests from the client are blocked even if they are otherwise legitimate. |
65 | /// </summary> | 65 | /// </summary> |
66 | public bool AllowRegionRestartFromClient { get; set; } | 66 | public bool AllowRegionRestartFromClient { get; set; } |
67 | public bool IgnoreEstateMinorAccessControl { get; set; } | ||
68 | public bool IgnoreEstatePaymentAccessControl { get; set; } | ||
67 | 69 | ||
68 | private EstateTerrainXferHandler TerrainUploader; | 70 | private EstateTerrainXferHandler TerrainUploader; |
69 | public TelehubManager m_Telehub; | 71 | public TelehubManager m_Telehub; |
@@ -89,7 +91,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
89 | IConfig config = source.Configs["EstateManagement"]; | 91 | IConfig config = source.Configs["EstateManagement"]; |
90 | 92 | ||
91 | if (config != null) | 93 | if (config != null) |
94 | { | ||
92 | AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true); | 95 | AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true); |
96 | IgnoreEstateMinorAccessControl = config.GetBoolean("IgnoreEstateMinorAccessControl", false); | ||
97 | IgnoreEstatePaymentAccessControl = config.GetBoolean("IgnoreEstatePaymentAccessControl", false); | ||
98 | } | ||
93 | } | 99 | } |
94 | 100 | ||
95 | public void AddRegion(Scene scene) | 101 | public void AddRegion(Scene scene) |
@@ -118,6 +124,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
118 | scene.TriggerEstateSunUpdate(); | 124 | scene.TriggerEstateSunUpdate(); |
119 | 125 | ||
120 | UserManager = scene.RequestModuleInterface<IUserManagement>(); | 126 | UserManager = scene.RequestModuleInterface<IUserManagement>(); |
127 | |||
128 | scene.RegionInfo.EstateSettings.DoDenyMinors = !IgnoreEstateMinorAccessControl; | ||
129 | scene.RegionInfo.EstateSettings.DoDenyAnonymous = !IgnoreEstateMinorAccessControl; | ||
121 | } | 130 | } |
122 | 131 | ||
123 | public void Close() | 132 | public void Close() |