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/UserAgentService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/HypergridService/UserAgentService.cs') diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index 6a5007f..49c7f89 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -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); } } @@ -571,10 +575,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; } -- cgit v1.1