mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
This commit is contained in:
@@ -60,6 +60,7 @@ namespace OpenSim.Services.HypergridService
|
||||
|
||||
protected string m_AllowedClients = string.Empty;
|
||||
protected string m_DeniedClients = string.Empty;
|
||||
private static bool m_ForeignAgentsAllowed = true;
|
||||
|
||||
private static UUID m_ScopeID;
|
||||
private static bool m_AllowTeleportsToAnyRegion;
|
||||
@@ -110,6 +111,7 @@ namespace OpenSim.Services.HypergridService
|
||||
|
||||
m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty);
|
||||
m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty);
|
||||
m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true);
|
||||
|
||||
if (m_GridService == null || m_PresenceService == null || m_SimulationService == null)
|
||||
throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function.");
|
||||
@@ -257,6 +259,17 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok");
|
||||
|
||||
//
|
||||
// Foreign agents allowed
|
||||
//
|
||||
if (account == null && !m_ForeignAgentsAllowed)
|
||||
{
|
||||
reason = "Unauthorized";
|
||||
m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1}. Refusing service.",
|
||||
aCircuit.firstname, aCircuit.lastname);
|
||||
return false;
|
||||
}
|
||||
|
||||
// May want to authorize
|
||||
|
||||
bool isFirstLogin = false;
|
||||
|
||||
@@ -53,8 +53,6 @@ namespace OpenSim.Services.HypergridService
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
protected new IXInventoryData m_Database;
|
||||
|
||||
private string m_HomeURL;
|
||||
private IUserAccountService m_UserAccountService;
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@ namespace OpenSim.Services.HypergridService
|
||||
|
||||
protected static string m_GridName;
|
||||
|
||||
protected static int m_LevelOutsideContacts;
|
||||
|
||||
protected static bool m_BypassClientVerification;
|
||||
|
||||
public UserAgentService(IConfigSource config) : this(config, null)
|
||||
@@ -127,6 +129,8 @@ namespace OpenSim.Services.HypergridService
|
||||
}
|
||||
if (!m_GridName.EndsWith("/"))
|
||||
m_GridName = m_GridName + "/";
|
||||
|
||||
m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,10 +573,16 @@ namespace OpenSim.Services.HypergridService
|
||||
|
||||
public UUID GetUUID(String first, String last)
|
||||
{
|
||||
// Let's see if it's a local user
|
||||
// Let's see if it's a local user
|
||||
UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last);
|
||||
if (account != null)
|
||||
return account.PrincipalID;
|
||||
{
|
||||
// check user level
|
||||
if (account.UserLevel < m_LevelOutsideContacts)
|
||||
return UUID.Zero;
|
||||
else
|
||||
return account.PrincipalID;
|
||||
}
|
||||
else
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace OpenSim.Services.InventoryService
|
||||
|
||||
if (check.Type != -1 || xFolder.type != -1)
|
||||
{
|
||||
if (xFolder.version > check.Version)
|
||||
if (xFolder.version < check.Version)
|
||||
return false;
|
||||
check.Version = (ushort)xFolder.version;
|
||||
xFolder = ConvertFromOpenSim(check);
|
||||
|
||||
Reference in New Issue
Block a user