aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorRob Smart2009-09-09 19:42:53 +0100
committerDiva Canto2009-09-10 17:51:28 -0700
commit16940097beee0fad554dfcb7249294ff8ac247d4 (patch)
tree3f5a904b5ac46cb028b00747c5fe8f215313b144 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-16940097beee0fad554dfcb7249294ff8ac247d4.zip
opensim-SC-16940097beee0fad554dfcb7249294ff8ac247d4.tar.gz
opensim-SC-16940097beee0fad554dfcb7249294ff8ac247d4.tar.bz2
opensim-SC-16940097beee0fad554dfcb7249294ff8ac247d4.tar.xz
The stubs for an authorization service, at the moment the service will always grant access to an avatar entering the region if requested.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5e27eff..1346844 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -134,6 +134,7 @@ namespace OpenSim.Region.Framework.Scenes
134 public IXfer XferManager; 134 public IXfer XferManager;
135 135
136 protected IAssetService m_AssetService = null; 136 protected IAssetService m_AssetService = null;
137 protected IAuthorizationService m_AuthorizationService = null;
137 138
138 public IAssetService AssetService 139 public IAssetService AssetService
139 { 140 {
@@ -152,6 +153,25 @@ namespace OpenSim.Region.Framework.Scenes
152 return m_AssetService; 153 return m_AssetService;
153 } 154 }
154 } 155 }
156
157 public IAuthorizationService AuthorizationService
158 {
159 get
160 {
161 if (m_AuthorizationService == null)
162 {
163 m_AuthorizationService = RequestModuleInterface<IAuthorizationService>();
164
165 if (m_AuthorizationService == null)
166 {
167 // don't throw an exception if no authorization service is set for the time being
168 m_log.InfoFormat("[SCENE]: No Authorization service is configured");
169 }
170 }
171
172 return m_AuthorizationService;
173 }
174 }
155 175
156 protected IInventoryService m_InventoryService = null; 176 protected IInventoryService m_InventoryService = null;
157 177
@@ -3230,7 +3250,18 @@ namespace OpenSim.Region.Framework.Scenes
3230 3250
3231 if (!m_strictAccessControl) return true; 3251 if (!m_strictAccessControl) return true;
3232 if (Permissions.IsGod(agent.AgentID)) return true; 3252 if (Permissions.IsGod(agent.AgentID)) return true;
3233 3253
3254 UserProfileData userProfile = CommsManager.UserService.GetUserProfile(agent.AgentID);
3255
3256 if(AuthorizationService!=null)
3257 {
3258 if(!AuthorizationService.isAuthorizedForRegion(userProfile,RegionInfo))
3259 {
3260 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);
3262 return false;
3263 }
3264 }
3234 3265
3235 if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) 3266 if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
3236 { 3267 {