From 7223b63563f28f6fe8044bdabcd1b9900d28c54a Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Tue, 27 Mar 2012 22:09:58 +0200 Subject: User level based restrictions for HyperGrid teleports, asset uploads, group creations and getting contacted from other grids. Incoming HyperGrid teleports can also be restricted to local users. --- OpenSim/Services/HypergridService/GatekeeperService.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'OpenSim/Services/HypergridService/GatekeeperService.cs') diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index 4e38687..149a0ab 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs @@ -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; -- cgit v1.1