diff options
author | onefang | 2019-08-02 21:20:11 +1000 |
---|---|---|
committer | onefang | 2019-08-02 21:20:11 +1000 |
commit | 85fcb4e75c94ff7b5b45609826df5113f32aacc0 (patch) | |
tree | b34fa5ce80e228850c1548b9ba210e6836558c2e /OpenSim/Region/CoreModules | |
parent | Bump sim ports up by 2 when creating, coz 5 is silly. (diff) | |
download | opensim-SC-85fcb4e75c94ff7b5b45609826df5113f32aacc0.zip opensim-SC-85fcb4e75c94ff7b5b45609826df5113f32aacc0.tar.gz opensim-SC-85fcb4e75c94ff7b5b45609826df5113f32aacc0.tar.bz2 opensim-SC-85fcb4e75c94ff7b5b45609826df5113f32aacc0.tar.xz |
Another attempt at sorting out the auto group chicken and egg problems.
Are you a local? Asking for a friend.
Diffstat (limited to 'OpenSim/Region/CoreModules')
3 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs index 2e06bc8..c910422 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/AuthorizationService.cs | |||
@@ -88,8 +88,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
88 | } | 88 | } |
89 | 89 | ||
90 | public bool IsAuthorizedForRegion( | 90 | public bool IsAuthorizedForRegion( |
91 | 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) |
92 | { | 92 | { |
93 | UUID userID = new UUID(user); | ||
94 | isLocal = m_UserManagement.IsLocalGridUser(userID); | ||
95 | |||
93 | // This should not happen | 96 | // This should not happen |
94 | if (m_Scene.RegionInfo.RegionID.ToString() != regionID) | 97 | if (m_Scene.RegionInfo.RegionID.ToString() != regionID) |
95 | { | 98 | { |
@@ -105,11 +108,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
105 | return true; | 108 | return true; |
106 | } | 109 | } |
107 | 110 | ||
108 | UUID userID = new UUID(user); | ||
109 | 111 | ||
110 | if ((m_accessValue & AccessFlags.DisallowForeigners) != 0) | 112 | if ((m_accessValue & AccessFlags.DisallowForeigners) != 0) |
111 | { | 113 | { |
112 | if (!m_UserManagement.IsLocalGridUser(userID)) | 114 | if (!isLocal) |
113 | { | 115 | { |
114 | message = "No foreign users allowed in this region"; | 116 | message = "No foreign users allowed in this region"; |
115 | return false; | 117 | return false; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs index 0be0676..b2be907 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs | |||
@@ -114,13 +114,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
114 | } | 114 | } |
115 | 115 | ||
116 | public bool IsAuthorizedForRegion( | 116 | public bool IsAuthorizedForRegion( |
117 | string userID, string firstName, string lastName, string regionID, out string message) | 117 | string userID, string firstName, string lastName, string regionID, out string message, out bool isLocal) |
118 | { | 118 | { |
119 | message = ""; | 119 | message = ""; |
120 | isLocal = false; | ||
120 | if (!m_Enabled) | 121 | if (!m_Enabled) |
121 | return true; | 122 | return true; |
122 | 123 | ||
123 | return m_AuthorizationService.IsAuthorizedForRegion(userID, firstName, lastName, regionID, out message); | 124 | return m_AuthorizationService.IsAuthorizedForRegion(userID, firstName, lastName, regionID, out message, out isLocal); |
124 | } | 125 | } |
125 | } | 126 | } |
126 | } \ No newline at end of file | 127 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs index f312b0d..3df3288 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
120 | } | 120 | } |
121 | 121 | ||
122 | public bool IsAuthorizedForRegion( | 122 | public bool IsAuthorizedForRegion( |
123 | string userID, string firstName, string lastName, string regionID, out string message) | 123 | string userID, string firstName, string lastName, string regionID, out string message, out bool isLocal) |
124 | { | 124 | { |
125 | m_log.InfoFormat( | 125 | m_log.InfoFormat( |
126 | "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); | 126 | "[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); |
@@ -141,6 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | isLocal = false; | ||
144 | if (scene != null) | 145 | if (scene != null) |
145 | { | 146 | { |
146 | string mail = String.Empty; | 147 | string mail = String.Empty; |
@@ -153,6 +154,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization | |||
153 | mail = account.Email; | 154 | mail = account.Email; |
154 | firstName = account.FirstName; | 155 | firstName = account.FirstName; |
155 | lastName = account.LastName; | 156 | lastName = account.LastName; |
157 | isLocal = true; | ||
156 | } | 158 | } |
157 | 159 | ||
158 | isAuthorized | 160 | isAuthorized |