diff options
author | UbitUmarov | 2017-01-27 12:32:01 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-27 12:32:01 +0000 |
commit | 56e3aaefde72bc8819dfb34b423f4ada65f1a195 (patch) | |
tree | f125f1f4f9fb38eb7a053078a7ed5a798c5be0db /OpenSim/Region/CoreModules/World/Permissions | |
parent | remove unused and wrong methods (diff) | |
download | opensim-SC-56e3aaefde72bc8819dfb34b423f4ada65f1a195.zip opensim-SC-56e3aaefde72bc8819dfb34b423f4ada65f1a195.tar.gz opensim-SC-56e3aaefde72bc8819dfb34b423f4ada65f1a195.tar.bz2 opensim-SC-56e3aaefde72bc8819dfb34b423f4ada65f1a195.tar.xz |
Permissions modules where made NONShared modules. Make them so, removing incoerences and their potencial bugs
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Permissions')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 152 |
1 files changed, 111 insertions, 41 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index bbebce1..a369c30 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -349,7 +349,77 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
349 | if (!m_Enabled) | 349 | if (!m_Enabled) |
350 | return; | 350 | return; |
351 | 351 | ||
352 | if(scene != m_scene) | ||
353 | return; | ||
354 | |||
352 | m_scene.UnregisterModuleInterface<IPermissionsModule>(this); | 355 | m_scene.UnregisterModuleInterface<IPermissionsModule>(this); |
356 | |||
357 | scenePermissions.OnBypassPermissions -= BypassPermissions; | ||
358 | scenePermissions.OnSetBypassPermissions -= SetBypassPermissions; | ||
359 | scenePermissions.OnPropagatePermissions -= PropagatePermissions; | ||
360 | |||
361 | scenePermissions.OnIsGridGod -= IsGridAdministrator; | ||
362 | scenePermissions.OnIsAdministrator -= IsAdministrator; | ||
363 | scenePermissions.OnIsEstateManager -= IsEstateManager; | ||
364 | |||
365 | scenePermissions.OnGenerateClientFlags -= GenerateClientFlags; | ||
366 | |||
367 | scenePermissions.OnIssueEstateCommand -= CanIssueEstateCommand; | ||
368 | scenePermissions.OnRunConsoleCommand -= CanRunConsoleCommand; | ||
369 | |||
370 | scenePermissions.OnTeleport -= CanTeleport; | ||
371 | |||
372 | scenePermissions.OnInstantMessage -= CanInstantMessage; | ||
373 | |||
374 | scenePermissions.OnAbandonParcel -= CanAbandonParcel; | ||
375 | scenePermissions.OnReclaimParcel -= CanReclaimParcel; | ||
376 | scenePermissions.OnDeedParcel -= CanDeedParcel; | ||
377 | scenePermissions.OnSellParcel -= CanSellParcel; | ||
378 | scenePermissions.OnEditParcelProperties -= CanEditParcelProperties; | ||
379 | scenePermissions.OnTerraformLand -= CanTerraformLand; | ||
380 | scenePermissions.OnBuyLand -= CanBuyLand; | ||
381 | |||
382 | scenePermissions.OnRezObject -= CanRezObject; | ||
383 | scenePermissions.OnObjectEntry -= CanObjectEntry; | ||
384 | scenePermissions.OnReturnObjects -= CanReturnObjects; | ||
385 | |||
386 | scenePermissions.OnDuplicateObject -= CanDuplicateObject; | ||
387 | scenePermissions.OnDeleteObjectByIDs -= CanDeleteObjectByIDs; | ||
388 | scenePermissions.OnDeleteObject -= CanDeleteObject; | ||
389 | scenePermissions.OnEditObjectByIDs -= CanEditObjectByIDs; | ||
390 | scenePermissions.OnEditObject -= CanEditObject; | ||
391 | scenePermissions.OnInventoryTransfer -= CanInventoryTransfer; | ||
392 | scenePermissions.OnMoveObject -= CanMoveObject; | ||
393 | scenePermissions.OnTakeObject -= CanTakeObject; | ||
394 | scenePermissions.OnTakeCopyObject -= CanTakeCopyObject; | ||
395 | scenePermissions.OnLinkObject -= CanLinkObject; | ||
396 | scenePermissions.OnDelinkObject -= CanDelinkObject; | ||
397 | scenePermissions.OnDeedObject -= CanDeedObject; | ||
398 | scenePermissions.OnSellGroupObject -= CanSellGroupObject; | ||
399 | |||
400 | scenePermissions.OnCreateObjectInventory -= CanCreateObjectInventory; | ||
401 | scenePermissions.OnEditObjectInventory -= CanEditObjectInventory; | ||
402 | scenePermissions.OnCopyObjectInventory -= CanCopyObjectInventory; | ||
403 | scenePermissions.OnDeleteObjectInventory -= CanDeleteObjectInventory; | ||
404 | scenePermissions.OnDoObjectInvToObjectInv -= CanDoObjectInvToObjectInv; | ||
405 | scenePermissions.OnDropInObjectInv -= CanDropInObjectInv; | ||
406 | |||
407 | scenePermissions.OnViewNotecard -= CanViewNotecard; | ||
408 | scenePermissions.OnViewScript -= CanViewScript; | ||
409 | scenePermissions.OnEditNotecard -= CanEditNotecard; | ||
410 | scenePermissions.OnEditScript -= CanEditScript; | ||
411 | scenePermissions.OnResetScript -= CanResetScript; | ||
412 | scenePermissions.OnRunScript -= CanRunScript; | ||
413 | scenePermissions.OnCompileScript -= CanCompileScript; | ||
414 | |||
415 | scenePermissions.OnCreateUserInventory -= CanCreateUserInventory; | ||
416 | scenePermissions.OnCopyUserInventory -= CanCopyUserInventory; | ||
417 | scenePermissions.OnEditUserInventory -= CanEditUserInventory; | ||
418 | scenePermissions.OnDeleteUserInventory -= CanDeleteUserInventory; | ||
419 | |||
420 | scenePermissions.OnControlPrimMedia -= CanControlPrimMedia; | ||
421 | scenePermissions.OnInteractWithPrimMedia -= CanInteractWithPrimMedia; | ||
422 | |||
353 | } | 423 | } |
354 | 424 | ||
355 | public void Close() | 425 | public void Close() |
@@ -1099,7 +1169,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1099 | #endregion | 1169 | #endregion |
1100 | 1170 | ||
1101 | #region Permission Checks | 1171 | #region Permission Checks |
1102 | private bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene) | 1172 | private bool CanAbandonParcel(UUID user, ILandObject parcel) |
1103 | { | 1173 | { |
1104 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1174 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1105 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1175 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1107,7 +1177,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1107 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false); | 1177 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease, false); |
1108 | } | 1178 | } |
1109 | 1179 | ||
1110 | private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene) | 1180 | private bool CanReclaimParcel(UUID user, ILandObject parcel) |
1111 | { | 1181 | { |
1112 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1182 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1113 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1183 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1115,7 +1185,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1115 | return GenericParcelOwnerPermission(user, parcel, 0,true); | 1185 | return GenericParcelOwnerPermission(user, parcel, 0,true); |
1116 | } | 1186 | } |
1117 | 1187 | ||
1118 | private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene) | 1188 | private bool CanDeedParcel(UUID user, ILandObject parcel) |
1119 | { | 1189 | { |
1120 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1190 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1121 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1191 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1129,7 +1199,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1129 | if (parcel.LandData.OwnerID != user) // Only the owner can deed! | 1199 | if (parcel.LandData.OwnerID != user) // Only the owner can deed! |
1130 | return false; | 1200 | return false; |
1131 | 1201 | ||
1132 | ScenePresence sp = scene.GetScenePresence(user); | 1202 | ScenePresence sp = m_scene.GetScenePresence(user); |
1133 | if(sp == null) | 1203 | if(sp == null) |
1134 | return false; | 1204 | return false; |
1135 | 1205 | ||
@@ -1179,7 +1249,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1179 | return true; | 1249 | return true; |
1180 | } | 1250 | } |
1181 | 1251 | ||
1182 | private bool CanDuplicateObject(SceneObjectGroup sog, ScenePresence sp, Scene scene) | 1252 | private bool CanDuplicateObject(SceneObjectGroup sog, ScenePresence sp) |
1183 | { | 1253 | { |
1184 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1254 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1185 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1255 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1195,7 +1265,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1195 | return false; | 1265 | return false; |
1196 | 1266 | ||
1197 | //If they can rez, they can duplicate | 1267 | //If they can rez, they can duplicate |
1198 | return CanRezObject(0, sp.UUID, sog.AbsolutePosition, scene); | 1268 | return CanRezObject(0, sp.UUID, sog.AbsolutePosition); |
1199 | } | 1269 | } |
1200 | 1270 | ||
1201 | private bool CanDeleteObject(SceneObjectGroup sog, ScenePresence sp) | 1271 | private bool CanDeleteObject(SceneObjectGroup sog, ScenePresence sp) |
@@ -1240,14 +1310,14 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1240 | return false; | 1310 | return false; |
1241 | } | 1311 | } |
1242 | 1312 | ||
1243 | private bool CanDeleteObjectByIDs(UUID objectID, UUID userID, Scene scene) | 1313 | private bool CanDeleteObjectByIDs(UUID objectID, UUID userID) |
1244 | { | 1314 | { |
1245 | // ignoring locked. viewers should warn and ask for confirmation | 1315 | // ignoring locked. viewers should warn and ask for confirmation |
1246 | 1316 | ||
1247 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1317 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1248 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1318 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1249 | 1319 | ||
1250 | SceneObjectGroup sog = scene.GetGroupByPrim(objectID); | 1320 | SceneObjectGroup sog = m_scene.GetGroupByPrim(objectID); |
1251 | if (sog == null) | 1321 | if (sog == null) |
1252 | return false; | 1322 | return false; |
1253 | 1323 | ||
@@ -1282,12 +1352,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1282 | return false; | 1352 | return false; |
1283 | } | 1353 | } |
1284 | 1354 | ||
1285 | private bool CanEditObjectByIDs(UUID objectID, UUID userID, Scene scene) | 1355 | private bool CanEditObjectByIDs(UUID objectID, UUID userID) |
1286 | { | 1356 | { |
1287 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1357 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1288 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1358 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1289 | 1359 | ||
1290 | SceneObjectGroup sog = scene.GetGroupByPrim(objectID); | 1360 | SceneObjectGroup sog = m_scene.GetGroupByPrim(objectID); |
1291 | if (sog == null) | 1361 | if (sog == null) |
1292 | return false; | 1362 | return false; |
1293 | 1363 | ||
@@ -1311,12 +1381,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1311 | return true; | 1381 | return true; |
1312 | } | 1382 | } |
1313 | 1383 | ||
1314 | private bool CanEditObjectInventory(UUID objectID, UUID userID, Scene scene) | 1384 | private bool CanEditObjectInventory(UUID objectID, UUID userID) |
1315 | { | 1385 | { |
1316 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1386 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1317 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1387 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1318 | 1388 | ||
1319 | SceneObjectGroup sog = scene.GetGroupByPrim(objectID); | 1389 | SceneObjectGroup sog = m_scene.GetGroupByPrim(objectID); |
1320 | if (sog == null) | 1390 | if (sog == null) |
1321 | return false; | 1391 | return false; |
1322 | 1392 | ||
@@ -1326,7 +1396,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1326 | return true; | 1396 | return true; |
1327 | } | 1397 | } |
1328 | 1398 | ||
1329 | private bool CanEditParcelProperties(UUID userID, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager) | 1399 | private bool CanEditParcelProperties(UUID userID, ILandObject parcel, GroupPowers p, bool allowManager) |
1330 | { | 1400 | { |
1331 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1401 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1332 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1402 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1342,7 +1412,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1342 | /// <param name="user"></param> | 1412 | /// <param name="user"></param> |
1343 | /// <param name="scene"></param> | 1413 | /// <param name="scene"></param> |
1344 | /// <returns></returns> | 1414 | /// <returns></returns> |
1345 | private bool CanEditScript(UUID script, UUID objectID, UUID userID, Scene scene) | 1415 | private bool CanEditScript(UUID script, UUID objectID, UUID userID) |
1346 | { | 1416 | { |
1347 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1417 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1348 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1418 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1353,7 +1423,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1353 | // Ordinarily, if you can view it, you can edit it | 1423 | // Ordinarily, if you can view it, you can edit it |
1354 | // There is no viewing a no mod script | 1424 | // There is no viewing a no mod script |
1355 | // | 1425 | // |
1356 | return CanViewScript(script, objectID, userID, scene); | 1426 | return CanViewScript(script, objectID, userID); |
1357 | } | 1427 | } |
1358 | 1428 | ||
1359 | /// <summary> | 1429 | /// <summary> |
@@ -1364,7 +1434,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1364 | /// <param name="user"></param> | 1434 | /// <param name="user"></param> |
1365 | /// <param name="scene"></param> | 1435 | /// <param name="scene"></param> |
1366 | /// <returns></returns> | 1436 | /// <returns></returns> |
1367 | private bool CanEditNotecard(UUID notecard, UUID objectID, UUID user, Scene scene) | 1437 | private bool CanEditNotecard(UUID notecard, UUID objectID, UUID user) |
1368 | { | 1438 | { |
1369 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1439 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1370 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1440 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1395,7 +1465,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1395 | } | 1465 | } |
1396 | else // Prim inventory | 1466 | else // Prim inventory |
1397 | { | 1467 | { |
1398 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 1468 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
1399 | if (part == null) | 1469 | if (part == null) |
1400 | return false; | 1470 | return false; |
1401 | 1471 | ||
@@ -1442,21 +1512,21 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1442 | return true; | 1512 | return true; |
1443 | } | 1513 | } |
1444 | 1514 | ||
1445 | private bool CanInstantMessage(UUID user, UUID target, Scene startScene) | 1515 | private bool CanInstantMessage(UUID user, UUID target) |
1446 | { | 1516 | { |
1447 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1517 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1448 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1518 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1449 | 1519 | ||
1450 | // If the sender is an object, check owner instead | 1520 | // If the sender is an object, check owner instead |
1451 | // | 1521 | // |
1452 | SceneObjectPart part = startScene.GetSceneObjectPart(user); | 1522 | SceneObjectPart part = m_scene.GetSceneObjectPart(user); |
1453 | if (part != null) | 1523 | if (part != null) |
1454 | user = part.OwnerID; | 1524 | user = part.OwnerID; |
1455 | 1525 | ||
1456 | return GenericCommunicationPermission(user, target); | 1526 | return GenericCommunicationPermission(user, target); |
1457 | } | 1527 | } |
1458 | 1528 | ||
1459 | private bool CanInventoryTransfer(UUID user, UUID target, Scene startScene) | 1529 | private bool CanInventoryTransfer(UUID user, UUID target) |
1460 | { | 1530 | { |
1461 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1531 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1462 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1532 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1464,7 +1534,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1464 | return GenericCommunicationPermission(user, target); | 1534 | return GenericCommunicationPermission(user, target); |
1465 | } | 1535 | } |
1466 | 1536 | ||
1467 | private bool CanIssueEstateCommand(UUID user, Scene requestFromScene, bool ownerCommand) | 1537 | private bool CanIssueEstateCommand(UUID user, bool ownerCommand) |
1468 | { | 1538 | { |
1469 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1539 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1470 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1540 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1498,7 +1568,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1498 | return true; | 1568 | return true; |
1499 | } | 1569 | } |
1500 | 1570 | ||
1501 | private bool CanObjectEntry(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint, Scene scene) | 1571 | private bool CanObjectEntry(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint) |
1502 | { | 1572 | { |
1503 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1573 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1504 | 1574 | ||
@@ -1506,8 +1576,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1506 | float newY = newPoint.Y; | 1576 | float newY = newPoint.Y; |
1507 | 1577 | ||
1508 | // allow outside region this is needed for crossings | 1578 | // allow outside region this is needed for crossings |
1509 | if (newX < -1f || newX > (scene.RegionInfo.RegionSizeX + 1.0f) || | 1579 | if (newX < -1f || newX > (m_scene.RegionInfo.RegionSizeX + 1.0f) || |
1510 | newY < -1f || newY > (scene.RegionInfo.RegionSizeY + 1.0f) ) | 1580 | newY < -1f || newY > (m_scene.RegionInfo.RegionSizeY + 1.0f) ) |
1511 | return true; | 1581 | return true; |
1512 | 1582 | ||
1513 | if(sog == null || sog.IsDeleted) | 1583 | if(sog == null || sog.IsDeleted) |
@@ -1516,7 +1586,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1516 | if (m_bypassPermissions) | 1586 | if (m_bypassPermissions) |
1517 | return m_bypassPermissionsValue; | 1587 | return m_bypassPermissionsValue; |
1518 | 1588 | ||
1519 | ILandObject parcel = scene.LandChannel.GetLandObject(newX, newY); | 1589 | ILandObject parcel = m_scene.LandChannel.GetLandObject(newX, newY); |
1520 | if (parcel == null) | 1590 | if (parcel == null) |
1521 | return false; | 1591 | return false; |
1522 | 1592 | ||
@@ -1554,12 +1624,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1554 | return false; | 1624 | return false; |
1555 | } | 1625 | } |
1556 | 1626 | ||
1557 | private bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene) | 1627 | private bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) |
1558 | { | 1628 | { |
1559 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1629 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1560 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1630 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1561 | 1631 | ||
1562 | ScenePresence sp = scene.GetScenePresence(user); | 1632 | ScenePresence sp = m_scene.GetScenePresence(user); |
1563 | if (sp == null) | 1633 | if (sp == null) |
1564 | return false; | 1634 | return false; |
1565 | 1635 | ||
@@ -1591,7 +1661,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1591 | else | 1661 | else |
1592 | { | 1662 | { |
1593 | Vector3 pos = g.AbsolutePosition; | 1663 | Vector3 pos = g.AbsolutePosition; |
1594 | l = scene.LandChannel.GetLandObject(pos.X, pos.Y); | 1664 | l = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); |
1595 | } | 1665 | } |
1596 | 1666 | ||
1597 | // If it's not over any land, then we can't do a thing | 1667 | // If it's not over any land, then we can't do a thing |
@@ -1662,7 +1732,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1662 | return true; | 1732 | return true; |
1663 | } | 1733 | } |
1664 | 1734 | ||
1665 | private bool CanRezObject(int objectCount, UUID userID, Vector3 objectPosition, Scene scene) | 1735 | private bool CanRezObject(int objectCount, UUID userID, Vector3 objectPosition) |
1666 | { | 1736 | { |
1667 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1737 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1668 | if (m_bypassPermissions) | 1738 | if (m_bypassPermissions) |
@@ -1670,7 +1740,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1670 | 1740 | ||
1671 | // m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name); | 1741 | // m_log.DebugFormat("[PERMISSIONS MODULE]: Checking rez object at {0} in {1}", objectPosition, m_scene.Name); |
1672 | 1742 | ||
1673 | ILandObject parcel = scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); | 1743 | ILandObject parcel = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); |
1674 | if (parcel == null || parcel.LandData == null) | 1744 | if (parcel == null || parcel.LandData == null) |
1675 | return false; | 1745 | return false; |
1676 | 1746 | ||
@@ -1696,7 +1766,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1696 | return false; | 1766 | return false; |
1697 | } | 1767 | } |
1698 | 1768 | ||
1699 | private bool CanRunConsoleCommand(UUID user, Scene requestFromScene) | 1769 | private bool CanRunConsoleCommand(UUID user) |
1700 | { | 1770 | { |
1701 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1771 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1702 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1772 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1741,7 +1811,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1741 | return GenericEstatePermission(part.OwnerID); | 1811 | return GenericEstatePermission(part.OwnerID); |
1742 | } | 1812 | } |
1743 | 1813 | ||
1744 | private bool CanSellParcel(UUID user, ILandObject parcel, Scene scene) | 1814 | private bool CanSellParcel(UUID user, ILandObject parcel) |
1745 | { | 1815 | { |
1746 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1816 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1747 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1817 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1749,7 +1819,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1749 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandSetSale, true); | 1819 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandSetSale, true); |
1750 | } | 1820 | } |
1751 | 1821 | ||
1752 | private bool CanSellGroupObject(UUID userID, UUID groupID, Scene scene) | 1822 | private bool CanSellGroupObject(UUID userID, UUID groupID) |
1753 | { | 1823 | { |
1754 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1824 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1755 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1825 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1823,7 +1893,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1823 | return true; | 1893 | return true; |
1824 | } | 1894 | } |
1825 | 1895 | ||
1826 | private bool CanTerraformLand(UUID userID, Vector3 position, Scene requestFromScene) | 1896 | private bool CanTerraformLand(UUID userID, Vector3 position) |
1827 | { | 1897 | { |
1828 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1898 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1829 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1899 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1873,7 +1943,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1873 | /// <param name="user"></param> | 1943 | /// <param name="user"></param> |
1874 | /// <param name="scene"></param> | 1944 | /// <param name="scene"></param> |
1875 | /// <returns></returns> | 1945 | /// <returns></returns> |
1876 | private bool CanViewScript(UUID script, UUID objectID, UUID userID, Scene scene) | 1946 | private bool CanViewScript(UUID script, UUID objectID, UUID userID) |
1877 | { | 1947 | { |
1878 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1948 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1879 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1949 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1915,7 +1985,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1915 | } | 1985 | } |
1916 | else // Prim inventory | 1986 | else // Prim inventory |
1917 | { | 1987 | { |
1918 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 1988 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
1919 | if (part == null) | 1989 | if (part == null) |
1920 | return false; | 1990 | return false; |
1921 | 1991 | ||
@@ -1962,7 +2032,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1962 | /// <param name="user"></param> | 2032 | /// <param name="user"></param> |
1963 | /// <param name="scene"></param> | 2033 | /// <param name="scene"></param> |
1964 | /// <returns></returns> | 2034 | /// <returns></returns> |
1965 | private bool CanViewNotecard(UUID notecard, UUID objectID, UUID userID, Scene scene) | 2035 | private bool CanViewNotecard(UUID notecard, UUID objectID, UUID userID) |
1966 | { | 2036 | { |
1967 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 2037 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1968 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 2038 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -1988,7 +2058,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1988 | } | 2058 | } |
1989 | else // Prim inventory | 2059 | else // Prim inventory |
1990 | { | 2060 | { |
1991 | SceneObjectPart part = scene.GetSceneObjectPart(objectID); | 2061 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
1992 | if (part == null) | 2062 | if (part == null) |
1993 | return false; | 2063 | return false; |
1994 | 2064 | ||
@@ -2051,7 +2121,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
2051 | return true; | 2121 | return true; |
2052 | } | 2122 | } |
2053 | 2123 | ||
2054 | private bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene) | 2124 | private bool CanBuyLand(UUID userID, ILandObject parcel) |
2055 | { | 2125 | { |
2056 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 2126 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
2057 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 2127 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -2319,7 +2389,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
2319 | return true; | 2389 | return true; |
2320 | } | 2390 | } |
2321 | 2391 | ||
2322 | private bool CanResetScript(UUID primID, UUID script, UUID agentID, Scene scene) | 2392 | private bool CanResetScript(UUID primID, UUID script, UUID agentID) |
2323 | { | 2393 | { |
2324 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 2394 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
2325 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 2395 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
@@ -2334,7 +2404,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
2334 | return true; | 2404 | return true; |
2335 | } | 2405 | } |
2336 | 2406 | ||
2337 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) | 2407 | private bool CanCompileScript(UUID ownerUUID, int scriptType) |
2338 | { | 2408 | { |
2339 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); | 2409 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); |
2340 | switch (scriptType) { | 2410 | switch (scriptType) { |