aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2009-09-10 19:56:08 -0700
committerDiva Canto2009-09-10 19:56:08 -0700
commitce332f235ccc5168cfc44834e16318497c67cdd7 (patch)
tree27e0f79a50060c981dffd4dbffe5938d70cad2a3 /OpenSim/Region
parentadded AuthorizationRequest and AuthorizationResponse objects for passing Auth... (diff)
downloadopensim-SC_OLD-ce332f235ccc5168cfc44834e16318497c67cdd7.zip
opensim-SC_OLD-ce332f235ccc5168cfc44834e16318497c67cdd7.tar.gz
opensim-SC_OLD-ce332f235ccc5168cfc44834e16318497c67cdd7.tar.bz2
opensim-SC_OLD-ce332f235ccc5168cfc44834e16318497c67cdd7.tar.xz
Changed the interface of IAuthorizationService to get less data.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
2 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
index 7973496..c52c257 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Authorization/LocalAuthorizationServiceConnector.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
67 IConfig moduleConfig = source.Configs["Modules"]; 67 IConfig moduleConfig = source.Configs["Modules"];
68 if (moduleConfig != null) 68 if (moduleConfig != null)
69 { 69 {
70 string name = moduleConfig.GetString("AuthorizationServices", ""); 70 string name = moduleConfig.GetString("AuthorizationServices", string.Empty);
71 if (name == Name) 71 if (name == Name)
72 { 72 {
73 IConfig authorizationConfig = source.Configs["AuthorizationService"]; 73 IConfig authorizationConfig = source.Configs["AuthorizationService"];
@@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
132 132
133 } 133 }
134 134
135 public bool isAuthorizedForRegion(UserProfileData user, RegionInfo region) 135 public bool IsAuthorizedForRegion(string userID, string regionID)
136 { 136 {
137 return m_AuthorizationService.isAuthorizedForRegion( user, region); 137 return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID);
138 } 138 }
139 139
140 } 140 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1346844..d95d9d3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3250,12 +3250,10 @@ namespace OpenSim.Region.Framework.Scenes
3250 3250
3251 if (!m_strictAccessControl) return true; 3251 if (!m_strictAccessControl) return true;
3252 if (Permissions.IsGod(agent.AgentID)) return true; 3252 if (Permissions.IsGod(agent.AgentID)) return true;
3253 3253
3254 UserProfileData userProfile = CommsManager.UserService.GetUserProfile(agent.AgentID); 3254 if (AuthorizationService != null)
3255
3256 if(AuthorizationService!=null)
3257 { 3255 {
3258 if(!AuthorizationService.isAuthorizedForRegion(userProfile,RegionInfo)) 3256 if(!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString()))
3259 { 3257 {
3260 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", 3258 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region",
3261 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); 3259 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);