aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-09-16 18:21:46 +0100
committerJustin Clark-Casey (justincc)2009-09-16 18:21:46 +0100
commita4c093469ae953971493977facbc81c49761577d (patch)
tree004f10f20c7e4d38088bf1eea8b5d2dd61a126df /OpenSim/Region
parenton iar save/load, let the user know if they put in the wrong password (diff)
parentupdated the IAuthorizationService interface so that a message is passed back ... (diff)
downloadopensim-SC_OLD-a4c093469ae953971493977facbc81c49761577d.zip
opensim-SC_OLD-a4c093469ae953971493977facbc81c49761577d.tar.gz
opensim-SC_OLD-a4c093469ae953971493977facbc81c49761577d.tar.bz2
opensim-SC_OLD-a4c093469ae953971493977facbc81c49761577d.tar.xz
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs3
3 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index c52c257..e69613a 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
132 132
133 } 133 }
134 134
135 public bool IsAuthorizedForRegion(string userID, string regionID) 135 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
136 { 136 {
137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID); 137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message);
138 } 138 }
139 139
140 } 140 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
index 9241851..a672f4f 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/RemoteAuthorizationServiceConnector.cs
@@ -117,11 +117,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
117 117
118 } 118 }
119 119
120 public bool IsAuthorizedForRegion(string userID, string regionID) 120 public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
121 { 121 {
122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID); 122 m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
123 123
124 bool isAuthorized = true; 124 bool isAuthorized = true;
125 message = String.Empty;
125 126
126 // get the scene this call is being made for 127 // get the scene this call is being made for
127 Scene scene = null; 128 Scene scene = null;
@@ -140,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
140 { 141 {
141 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID)); 142 UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID));
142 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName, 143 isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName,
143 profile.Email, scene.RegionInfo.RegionName, regionID); 144 profile.Email, scene.RegionInfo.RegionName, regionID, out message);
144 } 145 }
145 else 146 else
146 { 147 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a8028a6..d8478a2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3250,10 +3250,11 @@ namespace OpenSim.Region.Framework.Scenes
3250 3250
3251 if (AuthorizationService != null) 3251 if (AuthorizationService != null)
3252 { 3252 {
3253 if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString())) 3253 if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString(),out reason))
3254 { 3254 {
3255 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", 3255 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region",
3256 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3256 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3257 //reason = String.Format("You are not currently on the access list for {0}",RegionInfo.RegionName);
3257 return false; 3258 return false;
3258 } 3259 }
3259 } 3260 }