add options for regions to ignore age < 18 and payment access control where they don't apply

0.9.1.0-post-fixes
UbitUmarov 2018-07-14 16:36:41 +01:00
parent 6b8fda098d
commit a4881797b9
2 changed files with 14 additions and 6 deletions

View File

@ -224,7 +224,6 @@ namespace OpenSim.Framework
} }
private UUID m_EstateOwner = UUID.Zero; private UUID m_EstateOwner = UUID.Zero;
public UUID EstateOwner public UUID EstateOwner
{ {
get { return m_EstateOwner; } get { return m_EstateOwner; }
@ -232,7 +231,6 @@ namespace OpenSim.Framework
} }
private bool m_DenyMinors = false; private bool m_DenyMinors = false;
public bool DenyMinors public bool DenyMinors
{ {
get { return m_DenyMinors; } get { return m_DenyMinors; }
@ -258,7 +256,6 @@ namespace OpenSim.Framework
} }
private List<UUID> l_EstateAccess = new List<UUID>(); private List<UUID> l_EstateAccess = new List<UUID>();
public UUID[] EstateAccess public UUID[] EstateAccess
{ {
get { return l_EstateAccess.ToArray(); } get { return l_EstateAccess.ToArray(); }
@ -266,13 +263,15 @@ namespace OpenSim.Framework
} }
private List<UUID> l_EstateGroups = new List<UUID>(); private List<UUID> l_EstateGroups = new List<UUID>();
public UUID[] EstateGroups public UUID[] EstateGroups
{ {
get { return l_EstateGroups.ToArray(); } get { return l_EstateGroups.ToArray(); }
set { l_EstateGroups = new List<UUID>(value); } set { l_EstateGroups = new List<UUID>(value); }
} }
public bool DoDenyMinors = true;
public bool DoDenyAnonymous = true;
public EstateSettings() public EstateSettings()
{ {
} }
@ -380,14 +379,14 @@ namespace OpenSim.Framework
if (!HasAccess(avatarID)) if (!HasAccess(avatarID))
{ {
if (DenyMinors) if (DoDenyMinors && DenyMinors)
{ {
if ((userFlags & 32) == 0) if ((userFlags & 32) == 0)
{ {
return true; return true;
} }
} }
if (DenyAnonymous) if (DoDenyAnonymous && DenyAnonymous)
{ {
if ((userFlags & 4) == 0) if ((userFlags & 4) == 0)
{ {

View File

@ -64,6 +64,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
/// If false, region restart requests from the client are blocked even if they are otherwise legitimate. /// If false, region restart requests from the client are blocked even if they are otherwise legitimate.
/// </summary> /// </summary>
public bool AllowRegionRestartFromClient { get; set; } public bool AllowRegionRestartFromClient { get; set; }
public bool IgnoreEstateMinorAccessControl { get; set; }
public bool IgnoreEstatePaymentAccessControl { get; set; }
private EstateTerrainXferHandler TerrainUploader; private EstateTerrainXferHandler TerrainUploader;
public TelehubManager m_Telehub; public TelehubManager m_Telehub;
@ -89,7 +91,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
IConfig config = source.Configs["EstateManagement"]; IConfig config = source.Configs["EstateManagement"];
if (config != null) if (config != null)
{
AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true); AllowRegionRestartFromClient = config.GetBoolean("AllowRegionRestartFromClient", true);
IgnoreEstateMinorAccessControl = config.GetBoolean("IgnoreEstateMinorAccessControl", false);
IgnoreEstatePaymentAccessControl = config.GetBoolean("IgnoreEstatePaymentAccessControl", false);
}
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
@ -118,6 +124,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
scene.TriggerEstateSunUpdate(); scene.TriggerEstateSunUpdate();
UserManager = scene.RequestModuleInterface<IUserManagement>(); UserManager = scene.RequestModuleInterface<IUserManagement>();
scene.RegionInfo.EstateSettings.DoDenyMinors = !IgnoreEstateMinorAccessControl;
scene.RegionInfo.EstateSettings.DoDenyAnonymous = !IgnoreEstateMinorAccessControl;
} }
public void Close() public void Close()