aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs31
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5e27eff..d95d9d3 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,16 @@ 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 if (AuthorizationService != null)
3255 {
3256 if(!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString()))
3257 {
3258 m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region",
3259 agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
3260 return false;
3261 }
3262 }
3234 3263
3235 if (m_regInfo.EstateSettings.IsBanned(agent.AgentID)) 3264 if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
3236 { 3265 {