diff options
author | Melanie | 2012-03-27 23:14:43 +0100 |
---|---|---|
committer | Melanie | 2012-03-27 23:14:43 +0100 |
commit | b18b1b1d700d4a5ffd306e5b69a08b241188c525 (patch) | |
tree | 2bb99cd8095a9b562f9ee075274508da973dd2a2 /OpenSim/Services/HypergridService | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Reverse a conditional in XInventory that made updating system folder evrsion ... (diff) | |
download | opensim-SC-b18b1b1d700d4a5ffd306e5b69a08b241188c525.zip opensim-SC-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.gz opensim-SC-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.bz2 opensim-SC-b18b1b1d700d4a5ffd306e5b69a08b241188c525.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Services/HypergridService')
-rw-r--r-- | OpenSim/Services/HypergridService/GatekeeperService.cs | 13 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/HGInventoryService.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 14 |
3 files changed, 25 insertions, 4 deletions
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 | |||
60 | 60 | ||
61 | protected string m_AllowedClients = string.Empty; | 61 | protected string m_AllowedClients = string.Empty; |
62 | protected string m_DeniedClients = string.Empty; | 62 | protected string m_DeniedClients = string.Empty; |
63 | private static bool m_ForeignAgentsAllowed = true; | ||
63 | 64 | ||
64 | private static UUID m_ScopeID; | 65 | private static UUID m_ScopeID; |
65 | private static bool m_AllowTeleportsToAnyRegion; | 66 | private static bool m_AllowTeleportsToAnyRegion; |
@@ -110,6 +111,7 @@ namespace OpenSim.Services.HypergridService | |||
110 | 111 | ||
111 | m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty); | 112 | m_AllowedClients = serverConfig.GetString("AllowedClients", string.Empty); |
112 | m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty); | 113 | m_DeniedClients = serverConfig.GetString("DeniedClients", string.Empty); |
114 | m_ForeignAgentsAllowed = serverConfig.GetBoolean("ForeignAgentsAllowed", true); | ||
113 | 115 | ||
114 | if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) | 116 | if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) |
115 | throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); | 117 | throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); |
@@ -257,6 +259,17 @@ namespace OpenSim.Services.HypergridService | |||
257 | } | 259 | } |
258 | m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok"); | 260 | m_log.DebugFormat("[GATEKEEPER SERVICE]: User is ok"); |
259 | 261 | ||
262 | // | ||
263 | // Foreign agents allowed | ||
264 | // | ||
265 | if (account == null && !m_ForeignAgentsAllowed) | ||
266 | { | ||
267 | reason = "Unauthorized"; | ||
268 | m_log.InfoFormat("[GATEKEEPER SERVICE]: Foreign agents are not permitted {0} {1}. Refusing service.", | ||
269 | aCircuit.firstname, aCircuit.lastname); | ||
270 | return false; | ||
271 | } | ||
272 | |||
260 | // May want to authorize | 273 | // May want to authorize |
261 | 274 | ||
262 | bool isFirstLogin = false; | 275 | bool isFirstLogin = false; |
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index a1287fd..b29d803 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs | |||
@@ -53,8 +53,6 @@ namespace OpenSim.Services.HypergridService | |||
53 | LogManager.GetLogger( | 53 | LogManager.GetLogger( |
54 | MethodBase.GetCurrentMethod().DeclaringType); | 54 | MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | protected new IXInventoryData m_Database; | ||
57 | |||
58 | private string m_HomeURL; | 56 | private string m_HomeURL; |
59 | private IUserAccountService m_UserAccountService; | 57 | private IUserAccountService m_UserAccountService; |
60 | 58 | ||
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 842ca58..a49993c 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -73,6 +73,8 @@ namespace OpenSim.Services.HypergridService | |||
73 | 73 | ||
74 | protected static string m_GridName; | 74 | protected static string m_GridName; |
75 | 75 | ||
76 | protected static int m_LevelOutsideContacts; | ||
77 | |||
76 | protected static bool m_BypassClientVerification; | 78 | protected static bool m_BypassClientVerification; |
77 | 79 | ||
78 | public UserAgentService(IConfigSource config) : this(config, null) | 80 | public UserAgentService(IConfigSource config) : this(config, null) |
@@ -127,6 +129,8 @@ namespace OpenSim.Services.HypergridService | |||
127 | } | 129 | } |
128 | if (!m_GridName.EndsWith("/")) | 130 | if (!m_GridName.EndsWith("/")) |
129 | m_GridName = m_GridName + "/"; | 131 | m_GridName = m_GridName + "/"; |
132 | |||
133 | m_LevelOutsideContacts = serverConfig.GetInt("LevelOutsideContacts", 0); | ||
130 | } | 134 | } |
131 | } | 135 | } |
132 | 136 | ||
@@ -569,10 +573,16 @@ namespace OpenSim.Services.HypergridService | |||
569 | 573 | ||
570 | public UUID GetUUID(String first, String last) | 574 | public UUID GetUUID(String first, String last) |
571 | { | 575 | { |
572 | // Let's see if it's a local user | 576 | // Let's see if it's a local user |
573 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last); | 577 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last); |
574 | if (account != null) | 578 | if (account != null) |
575 | return account.PrincipalID; | 579 | { |
580 | // check user level | ||
581 | if (account.UserLevel < m_LevelOutsideContacts) | ||
582 | return UUID.Zero; | ||
583 | else | ||
584 | return account.PrincipalID; | ||
585 | } | ||
576 | else | 586 | else |
577 | return UUID.Zero; | 587 | return UUID.Zero; |
578 | } | 588 | } |