aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index b8d409d..3df3288 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
51 private bool m_Enabled = false; 51 private bool m_Enabled = false;
52 private List<Scene> m_scenes = new List<Scene>(); 52 private List<Scene> m_scenes = new List<Scene>();
53 53
54 public Type ReplaceableInterface 54 public Type ReplaceableInterface
55 { 55 {
56 get { return null; } 56 get { return null; }
57 } 57 }
@@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
103 m_scenes.Add(scene); 103 m_scenes.Add(scene);
104 scene.RegisterModuleInterface<IAuthorizationService>(this); 104 scene.RegisterModuleInterface<IAuthorizationService>(this);
105 } 105 }
106 106
107 } 107 }
108 108
109 public void RemoveRegion(Scene scene) 109 public void RemoveRegion(Scene scene)
@@ -118,16 +118,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName); 118 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: Enabled remote authorization for region {0}", scene.RegionInfo.RegionName);
119 119
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);
127 127
128 bool isAuthorized = true; 128 bool isAuthorized = true;
129 message = String.Empty; 129 message = String.Empty;
130 130
131 // get the scene this call is being made for 131 // get the scene this call is being made for
132 Scene scene = null; 132 Scene scene = null;
133 lock (m_scenes) 133 lock (m_scenes)
@@ -140,11 +140,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 } 140 }
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;
147 148
148 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID)); 149 UserAccount account = scene.UserAccountService.GetUserAccount(UUID.Zero, new UUID(userID));
149 150
150 //if account not found, we assume its a foreign visitor from HG, else use account data... 151 //if account not found, we assume its a foreign visitor from HG, else use account data...
@@ -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
@@ -165,7 +167,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
165 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}", 167 "[REMOTE AUTHORIZATION CONNECTOR] IsAuthorizedForRegion, can't find scene to match region id of {0}",
166 regionID); 168 regionID);
167 } 169 }
168 170
169 return isAuthorized; 171 return isAuthorized;
170 } 172 }
171 } 173 }