diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs index 93dff1f..c910422 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs | |||
@@ -69,7 +69,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
69 | 69 | ||
70 | if (config != null) | 70 | if (config != null) |
71 | { | 71 | { |
72 | string accessStr = config.GetString("Region_" + scene.RegionInfo.RegionName.Replace(' ', '_'), String.Empty); | 72 | string defaultAccess = config.GetString("DefaultRegionAccess", "None"); |
73 | string accessStr = config.GetString("Region_" + scene.RegionInfo.RegionName.Replace(' ', '_'), defaultAccess); | ||
73 | if (accessStr != string.Empty) | 74 | if (accessStr != string.Empty) |
74 | { | 75 | { |
75 | try | 76 | try |
@@ -87,8 +88,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
87 | } | 88 | } |
88 | 89 | ||
89 | public bool IsAuthorizedForRegion( | 90 | public bool IsAuthorizedForRegion( |
90 | string user, string firstName, string lastName, string regionID, out string message) | 91 | string user, string firstName, string lastName, string regionID, out string message, out bool isLocal) |
91 | { | 92 | { |
93 | UUID userID = new UUID(user); | ||
94 | isLocal = m_UserManagement.IsLocalGridUser(userID); | ||
95 | |||
92 | // This should not happen | 96 | // This should not happen |
93 | if (m_Scene.RegionInfo.RegionID.ToString() != regionID) | 97 | if (m_Scene.RegionInfo.RegionID.ToString() != regionID) |
94 | { | 98 | { |
@@ -104,11 +108,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
104 | return true; | 108 | return true; |
105 | } | 109 | } |
106 | 110 | ||
107 | UUID userID = new UUID(user); | ||
108 | 111 | ||
109 | if ((m_accessValue & AccessFlags.DisallowForeigners) != 0) | 112 | if ((m_accessValue & AccessFlags.DisallowForeigners) != 0) |
110 | { | 113 | { |
111 | if (!m_UserManagement.IsLocalGridUser(userID)) | 114 | if (!isLocal) |
112 | { | 115 | { |
113 | message = "No foreign users allowed in this region"; | 116 | message = "No foreign users allowed in this region"; |
114 | return false; | 117 | return false; |