aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authormingchen2008-05-07 17:33:57 +0000
committermingchen2008-05-07 17:33:57 +0000
commit6551f17966975081ac9b9f4c3b19d33e9d2c69a5 (patch)
tree24fee3acb4381334e3e4cdc46712e20d63803839 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentFrom: Kurt Taylor <krtaylor@us.ibm.com> (diff)
downloadopensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.zip
opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.gz
opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.bz2
opensim-SC-6551f17966975081ac9b9f4c3b19d33e9d2c69a5.tar.xz
*Added SceneExternalChecks.cs that is used to manage checking the results of multiple functions that register with the class and return the result (usually true/false) based on those results. This is useful for module wanting to put their opinion in decisions such as 'can the user rez this object?'
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs19
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 65e6fd8..b536048 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1267,10 +1267,7 @@ namespace OpenSim.Region.Environment.Scenes
1267 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1), 1267 RayStart, RayEnd, RayTargetID, new LLQuaternion(0, 0, 0, 1),
1268 BypassRayCast, bRayEndIsIntersection,true,scale, false); 1268 BypassRayCast, bRayEndIsIntersection,true,scale, false);
1269 1269
1270 if (!Permissions.CanRezObject(remoteClient.AgentId, pos) && !attachment) 1270
1271 {
1272 return null;
1273 }
1274 1271
1275 // Rez object 1272 // Rez object
1276 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 1273 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -1288,6 +1285,11 @@ namespace OpenSim.Region.Environment.Scenes
1288 { 1285 {
1289 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1286 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
1290 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1287 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1288 if (!Permissions.CanRezObject(remoteClient.AgentId, pos, group.Children.Count) && !attachment)
1289 {
1290 return null;
1291 }
1292
1291 group.ResetIDs(); 1293 group.ResetIDs();
1292 AddEntity(group); 1294 AddEntity(group);
1293 1295
@@ -1361,10 +1363,6 @@ namespace OpenSim.Region.Environment.Scenes
1361 { 1363 {
1362 LLUUID ownerID = item.OwnerID; 1364 LLUUID ownerID = item.OwnerID;
1363 1365
1364 if (!Permissions.CanRezObject(ownerID, pos))
1365 {
1366 return null;
1367 }
1368 1366
1369 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); 1367 AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false);
1370 1368
@@ -1372,6 +1370,11 @@ namespace OpenSim.Region.Environment.Scenes
1372 { 1370 {
1373 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1371 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
1374 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1372 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1373
1374 if (!Permissions.CanRezObject(ownerID, pos, group.Children.Count))
1375 {
1376 return null;
1377 }
1375 group.ResetIDs(); 1378 group.ResetIDs();
1376 AddEntity(group); 1379 AddEntity(group);
1377 1380