diff options
author | Snoopy Pfeffer | 2012-03-27 22:09:58 +0200 |
---|---|---|
committer | Snoopy Pfeffer | 2012-03-27 22:09:58 +0200 |
commit | 7223b63563f28f6fe8044bdabcd1b9900d28c54a (patch) | |
tree | 7bf1df67f9a1388b940b386e64e239f52f986a4b /OpenSim/Services/HypergridService/UserAgentService.cs | |
parent | HG: beginning of a more restrictive inventory access procedure (optional). Ex... (diff) | |
download | opensim-SC_OLD-7223b63563f28f6fe8044bdabcd1b9900d28c54a.zip opensim-SC_OLD-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.gz opensim-SC_OLD-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.bz2 opensim-SC_OLD-7223b63563f28f6fe8044bdabcd1b9900d28c54a.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 14 |
1 files changed, 12 insertions, 2 deletions
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 | |||
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 | ||
@@ -571,10 +575,16 @@ namespace OpenSim.Services.HypergridService | |||
571 | 575 | ||
572 | public UUID GetUUID(String first, String last) | 576 | public UUID GetUUID(String first, String last) |
573 | { | 577 | { |
574 | // Let's see if it's a local user | 578 | // Let's see if it's a local user |
575 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last); | 579 | UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, first, last); |
576 | if (account != null) | 580 | if (account != null) |
577 | return account.PrincipalID; | 581 | { |
582 | // check user level | ||
583 | if (account.UserLevel < m_LevelOutsideContacts) | ||
584 | return UUID.Zero; | ||
585 | else | ||
586 | return account.PrincipalID; | ||
587 | } | ||
578 | else | 588 | else |
579 | return UUID.Zero; | 589 | return UUID.Zero; |
580 | } | 590 | } |